阿里云容器镜像服务基本操作


 

由于境外网络问题HubDocker(docker.io),拉镜像比较慢,改用阿里云registry 容器镜像服务。

注册阿里云账号并登录,进入阿里云容器镜像服务,创建个人公有仓库。

在本地登录我的个人:

sudo docker login --username=474033326@qq.com registry.cn-shanghai.aliyuncs.com

 

第一步:搜索镜像,找出合适的镜像

 

 

第二步:拉到本地

 docker pull registry.cn-shanghai.aliyuncs.com/junior/alpine-php-swoole

docker images 可看到本地镜像已成功拉去到

 

第三步:

docker run -it registry.cn-shanghai.aliyuncs.com/junior/alpine-php-swoole 开启并进入容器,拿到containerID

 

第四步:提交容器记录到我的仓库

docker commit [containerID] 阿里云仓库域名/应用空间/仓库名称:版本

docker commit 14835a70d143 registry.cn-shanghai.aliyuncs.com/ys_php/psm:last

 

第五步:push镜像到阿里云公有仓库

docker push registry.cn-shanghai.aliyuncs.com/ys_php/psm:last

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM