docker commit 提交容器为一个新的副本
命令和Git 原理类似
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| docker commit -m='提交的描述信息' -a='作者' 容器id 目标镜像名:[tag]
[root@iZ2zeiomla8im1ff7r6drfZ ~]# docker commit -m 'cent-test' -a '2y' 37e4c2d6e530 registry.cn-beijing.aliyuncs.com/yishto/learn:cent-test sha256:787d8afcad4bfcb0d664cc85a0fad7449cddd2efd6fbbecd36fd31f2cc139e28 [root@iZ2zeiomla8im1ff7r6drfZ ~]# [root@iZ2zeiomla8im1ff7r6drfZ ~]# [root@iZ2zeiomla8im1ff7r6drfZ ~]# [root@iZ2zeiomla8im1ff7r6drfZ ~]# [root@iZ2zeiomla8im1ff7r6drfZ ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE registry.cn-beijing.aliyuncs.com/yishto/learn cent-test 787d8afcad4b 7 seconds ago 321MB ubuntu latest 1318b700e415 2 weeks ago 72.8MB registry.cn-beijing.aliyuncs.com/yishto/learn ubuntu-v1.0 1318b700e415 2 weeks ago 72.8MB mysql latest c60d96bd2b77 3 weeks ago 514MB portainer/portainer latest 580c0e4e98b0 4 months ago 79.1MB centos latest 300e315adb2f 8 months ago 209MB [root@iZ2zeiomla8im1ff7r6drfZ ~]# docker push registry.cn-beijing.aliyuncs.com/yishto/learn:cent-test
|