发布到DockerHub
DockerHub网址:https://hub.docker.com/
首先确保已经注册了账号,并登录成功;才能把自己的镜像发布到DockerHub上!
一、命令行代码登录
root@liang:/home/joila# docker login -h
Flag shorthand -h has been deprecated, please use --help
Usage: docker login [OPTIONS] [SERVER]
Log in to a Docker registry.
If no server is specified, the default is defined by the daemon.
Options:
-p, --password string Password # 密码
--password-stdin Take the password from stdin
-u, --username string Username # 用户名