docker commit centos01 yosizo/httpd:ver1.0
docker commit [イメージ名] [リポジトリ名:タグ名]
→commitサブコマンドで対象のイメージを指定、作成するリポジトリ名を指定
[root@localhost sysconfig]# docker attach centos01
[root@956ebd5d66b4 /]#
[root@956ebd5d66b4 /]# exit
exit
[root@localhost sysconfig]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
956ebd5d66b4 enakai00/centos:centos6 "/bin/bash" 26 hours ago Exited (0) 5 seconds ago centos01
[root@localhost sysconfig]#
[root@localhost sysconfig]# docker commit centos01 yosizo/httpd:ver1.0
sha256:24a55adfc23e9963b2771a0acfae076954c26f0d1b841202e0ada476efaeadde
[root@localhost sysconfig]#
[root@localhost sysconfig]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
yosizo/httpd ver1.0 24a55adfc23e 8 seconds ago 267.7 MB
docker.io/enakai00/centos centos6 b8c94c5d2d7c 2 years ago 203.1 MB
docker.io/enakai00/centos centos7 3bd78cf8ed76 2 years ago 172.2 MB
docker.io/enakai00/centos latest 3bd78cf8ed76 2 years ago 172.2 MB
[root@localhost sysconfig]#
[root@localhost sysconfig]# docker images yosizo/httpd:ver1.0
REPOSITORY TAG IMAGE ID CREATED SIZE
yosizo/httpd ver1.0 24a55adfc23e 46 seconds ago 267.7 MB
[root@localhost sysconfig]#
0 件のコメント:
コメントを投稿