3

Docker将镜像文件发布到阿里云 - SportSky

 1 year ago
source link: https://www.cnblogs.com/sportsky/p/16246394.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

一、创建新镜像文件

1、创建容器并在容器内创建一个文件夹

在容器内创建一个新文件主要是为了代表这个容器非镜像文件直接创建的容器,而是通过自定义在容器内创建了属于自己的文件

 2、提交容器副本使之成为一个新的镜像

# 提交格式
docker commit -m="提交的描述信息" -a="作者" 容器id 要创建的目标镜像名:[标签名,也就是版本号]

 启动刚刚提交的新镜像文件,首先是创建一个新的容器,进入容器查看根目录是否存在xiaohemiao文件

 二、本地镜像发布到阿里云-个人版

 1、创建仓库镜像

登录阿里云,在阿里云创建属于自己的命名空间

创建镜像仓库

 2、将镜像推送到阿里云

根据阿里云镜像仓库里面的操作指南进行操作命令即可

3、从阿里云pull镜像

为了方便演示,首先先删掉我们本地的myredis镜像,然后再从阿里云pull myredis镜像,如图演示


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK