
镜像生成的方法:
- 使用DockerFile生成 docker build -f dockfile的绝对路径地址 -t 镜像名:TAG
- 从容器创建一个新的镜像。docker commit [options] 容器ID REPOSITORY:TAG
1,访问阿里云开发平台,创建仓库镜像。(https://cr.console.aliyun.com/)
2,将镜像推送到Registry
# 登录阿里云Registry $ sudo docker login --username=whatevervip registry.cn-hangzhou.aliyuncs.com # 新建远程镜像保存在本地 $ sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/flygoldfish/centos:[镜像版本号] # 推送到阿里云 $ sudo docker push registry.cn-hangzhou.aliyuncs.com/flygoldfish/centos:[镜像版本号]


4,可以在阿里云镜像仓库查询上传成功。
5,从阿里云Registry中拉取镜像
$ sudo docker pull registry.cn-hangzhou.aliyuncs.com/flygoldfish/centos:[镜像版本号]

posted on
浙公网安备 33010602011771号