发布到dockerhub
- 发布到dockerhub
- dockerhub地址:hub.docker.com/ 注册自己的账号
- 确保这个账号可以登录
- 登录成功显示
- 在我们的服务器上提交自己的镜像
- 登录完毕之后就可以提交镜像了,就是一步 docker push
root@iZbp12kyfwxfku3288sr59Z:/home# docker login --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 用户名- 登录成功
root@iZbp12kyfwxfku3288sr59Z:/home# docker login -u waws520 登录的命令 Password: WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded - 进行提交
- 提交有个前提就是我们的镜像的tag必须要以我们的用户名开始,否则拒绝提交
- denied: requested access to the resource is denied
- 1 先登录 docker login
- 2 查看tag是否有用户名
- 首先我们对其重新打标签
- docker tag 镜像id waws520/my_image:1.0
- Docker push waws520/my_image:1.0
- 正在上传
- 上传成功
- 提交的时候也是按照层来进行提交的
- denied: requested access to the resource is denied
- 提交有个前提就是我们的镜像的tag必须要以我们的用户名开始,否则拒绝提交
- 登录成功
- 登录成功显示
发布到阿里云
- 登录阿里云
- 找到镜像服务
- 创建命名空间
- 创建仓库
- 详细的步骤
- 登录成功
- 更改版本号以及上传