docker:/root# docker search centos
NAME DESCRIPTION STARS OFFICIAL
AUTOMATED
centos The official build of CentOS. 2028 [OK]
jdeathe/centos-ssh CentOS-6 6.7 x86_64 / CentOS-7 7.2.1511 x8... 17 [OK]
jdeathe/centos-ssh-apache-php CentOS-6 6.7 x86_64 / Apache / PHP / PHP M... 14 [OK]
million12/centos-supervisor Base CentOS-7 with supervisord launcher, h... 9 [OK]
blalor/centos Bare-bones base CentOS 6.5 image 8 [OK]
nimmis/java-centos This is docker images of CentOS 7 with dif... 7 [OK]
torusware/speedus-centos Always updated official CentOS docker imag... 7 [OK]
nickistre/centos-lamp LAMP on centos setup 3 [OK]
nathonfowlie/centos-jre Latest CentOS image with the JRE pre-insta... 3 [OK]
centos/mariadb55-centos7 3 [OK]
consol/sakuli-centos-xfce Sakuli end-2-end testing and monitoring co... 2 [OK]
softvisio/centos Centos 1 [OK]
layerworx/centos CentOS container with etcd, etcdctl, confd... 1 [OK]
yajo/centos-epel CentOS with EPEL and fully updated 1 [OK]
timhughes/centos Centos with systemd installed and running 1 [OK]
pacur/centos-7 Pacur CentOS 7 1 [OK]
pacur/centos-6 Pacur CentOS 6 1 [OK]
darksheer/centos Base Centos Image -- Updated hourly 1 [OK]
lighthopper/orientdb-centos A Dockerfile for creating an OrientDB imag... 1 [OK]
ustclug/centos USTC centos 0 [OK]
blacklabelops/centos CentOS Base Image! Built and Updates Daily! 0 [OK]
jsmigel/centos-epel Docker base image of CentOS w/ EPEL installed 0 [OK]
grayzone/centos auto build for centos. 0 [OK]
lighthopper/openjdk-centos A Dockerfile for creating an OpenJDK image... 0 [OK]
januswel/centos yum update-ed CentOS image 0 [OK]
启动镜像:
docker run -it centos /bin/bash
-i 表示让容器的标准输入打开,
-t 表示分配一个伪终端:
/bin/bash 容器里面允许的/bin/bash
docker pull centos:6.5 获取容器:
docker:/root# docker pull --help
Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]
Pull an image or a repository from the registry
拉取一个镜像或者一个存储库 从注册处
查看镜像:
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
前台运行docker:
docker:/root# docker run -it januswel/centos /bin/bash
[root@13fe7a3f05cc /]#
查看正在运行的容器:
docker:/root# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
13fe7a3f05cc januswel/centos "/bin/bash" About a minute ago Up About a minute
boring_torvalds
已经停掉的容器:
docker:/root# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
13fe7a3f05cc januswel/centos "/bin/bash" 2 minutes ago Up 2 minutes
boring_torvalds
创建 复制一个镜像:
docker:/root# docker tag januswel/centos jj123
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
jj123 latest 088820de4929 12 days ago 198.3 MB
docker 删除镜像:
docker rmi jj123:latest
docker rmi REPOSITORY:TAG
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
jj123 latest 088820de4929 12 days ago 198.3 MB
docker:/root# docker rmi jj123:latest
Untagged: jj123:latest
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
修改tag:
docker:/root# docker tag januswel/centos linux123
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
linux123 latest 088820de4929 12 days ago 198.3 MB
docker:/root# docker tag januswel/centos linux123:jj
docker:/root# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
januswel/centos latest 088820de4929 12 days ago 198.3 MB
linux123 latest 088820de4929 12 days ago 198.3 MB
linux123 jj 088820de4929 12 days ago 198.3 MB
docker 镜像管理
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:docker 创建镜像
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Docker 镜像管理,解决下载慢的问题
解决docker镜像下载慢、无法下载的问题
Docker Nginx -
01-docker技术概述、容器管理命令、镜像管理命令
docker管理命令、容器管理命令
docker kylin linux -
Docker之docker镜像管理
一 镜像结构和原理 1.1 Docker镜像原理 镜像即创建容器的模板,含有启动
nginx docker ubuntu -
docker镜像、容器管理
docker镜像及容器
Docker docker