|
[root@sungeek downloads]# wget https://download.docker.com/linu ... 7.centos.x86_64.rpm[root@sungeek downloads]# yum install docker-ce-18.03.0.ce-1.el7.centos.x86_64.rpm[root@sungeek ~]# yum install -y yum-utils \device-mapper-persistent-data \lvm2[root@sungeek ~]# yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo[root@sungeek ~]# yum-config-manager --enable docker-ce-edge[root@sungeek ~]# yum-config-manager --enable docker-ce-test[root@sungeek ~]# yum-config-manager --disable docker-ce-edge[root@sungeek ~]# yum makecache fastLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile* base: mirrors.cn99.com* extras: mirrors.shu.edu.cn* updates: mirrors.shu.edu.cnbase | 3.6 kB 00:00:00 docker-ce-edge | 2.9 kB 00:00:00 docker-ce-stable | 2.9 kB 00:00:00 docker-ce-test | 2.9 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 docker-ce-test/x86_64/primary_db | 47 kB 00:00:00 Metadata Cache Created[root@sungeek ~]# yum install docker-ce [root@sungeek ~]# yum list docker-ce.x86_64 --showduplicates | sort -rdocker-ce.x86_64 18.03.0.ce-1.el7.centos docker-ce-stable[root@sungeek ~]# yum install docker-ce-<VERSION> [root@sungeek ~]# yum install docker-ce-docker-ce-18.03.0.ce-1.el7.centos[root@localhost downloads]# systemctl start docker[root@localhost downloads]# systemctl status docker[root@localhost downloads]# systemctl enable docker --设置开机自启动docker服务[root@localhost downloads]# docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/hello-world latest e38bc07ac18e 2 months ago 1.85 kB[root@localhost downloads]# docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES3fa4f2de1c01 hello-world "/hello" 4 minutes ago Exited (0) 4 minutes ago elastic_lumiere[root@sungeek ~]# yum list installed | grep dockerdocker-client.x86_64 2:1.13.1-63.git94f4240.el7.centos @extras docker-common.x86_64 2:1.13.1-63.git94f4240.el7.centos @extras [root@sungeek ~]# yum -y remove docker-client.x86_64[root@sungeek ~]# yum -y remove docker-common.x86_64[root@sungeek ~]# rm -rf /var/lib/docker/[root@sungeek ~]# docker --version-bash: /usr/bin/docker: No such file or directory[root@sungeek ~]# docker-bash: /usr/bin/docker: No such file or directory5.导入加载进来觉得不合适可以使用 docker rm 容器ID 、 docker rmi 镜像ID 来删掉。
移除所有的容器和镜像:
复制代码 代码如下:[root@sungeek ~]# docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q -a)
还有更多的命令可以参考docker命令大全:http://edu.jb51.net/docker/docker-command-manual.html
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持Vecloud。 MPLS VPN是企业VPN市场的主流解决方案,MPLS VPN(多协议标签交换虚拟专用网)是一种利用标签来引导开放通信网络上高速高效数据传输的新技术。多协议的含义是指MPLS不仅可以在网络层支持多种协议,还可以在第二层兼容多种链路层技术。
|
|