docker ps
打开终端并运行以下命令,以获取你要创建新镜像的容器的ID。
使用 docker commit
命令创建新镜像:
docker commit <container-id> <new-image-name>
docker commit d47ae73c6ded chatdb-ai
验证新镜像:
docker images
上传到 阿里云 # 需要先登录
docker login --username=***** registry.cn-shanghai.aliyuncs.com
如果登录报错
mv ~/.docker/config.json ~/.docker/config.json.bak
docker tag 451c7f0b2ca2 registry.cn-shanghai.aliyuncs.com/ai-k/chatdbai:1
docker push registry.cn-shanghai.aliyuncs.com/ai-k/chatdbai:1
查看自己容器
https://cr.console.aliyun.com/repository/cn-shanghai
标签:容器,aliyuncs,cn,shanghai,镜像,docker,com From: https://www.cnblogs.com/hui413027075/p/17793638.html