Docker 镜像

原创
2018/10/03 14:42
阅读数 46
  • image
  • docker image ls
显示镜像
root@terry:~# docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              16.04               7aa3602ab41e        5 days ago          115 MB
jenkins/jenkins     lts                 80fc01fa46f9        13 days ago         700 MB

  • docker pull
<用户名>:<镜像名>
获取镜像
<仓库名>:<标签>
  • docker image rm
image id
取前三个即可
root@terry:~# docker image rm 7aa
Untagged: ubuntu:16.04
Untagged: ubuntu@sha256:3097ac92b852f878f802c22a38f97b097b4084dbef82893ba453ba0297d76a6a
Deleted: sha256:7aa3602ab41ea3384904197455e66f6435cb0261bd62a06db1d8e76cb8960c42
Deleted: sha256:f76ad2747c0572f55b020c680fb3ecf2c9888bc124773c2e99a8aef5a2b57ee9
Deleted: sha256:e843589b7eab2c99f01c7c36603e79cd582ec77e923801fc5477e676ca99f937
Deleted: sha256:32fe28af8b933473d4fc8e0fdff4f53a3dd878e777d2d0f4e069eafec89dec24
Deleted: sha256:c78abc0d85ace0d885a620a4fd6af7f3d4700efe13499996128e15e970703762
Deleted: sha256:0a42ee6ceccb1b90de2a3badec7c74cc452ce61e7ef20a80bb7f20ea53f2825e
untagged: 取掉标签
deleted : 删除相关镜像
docker image ls -q 查询相关镜像
  • docker commit
制作新镜像,一般不用,会使得镜像拥肿

参考

《Docker 入门与实践》

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部