Fork me on GitHub

docker

Docker安装:

centos7 上的安装方法:

# 查看当前内核版本 $ sudo uname -r

# 安装Docker $ sudo yum -y install docker

# 启动Docker $ sudo service docker start

# 测试 $ sudo docker run hello-world

#设置docker 开机启动 $ sudo systemctl enable docker

docker 清理命令

#杀死所有正在运行的容器 $ sudo docker kill $(docker ps -a -q)

#删除所有已经停止的容器 $ sudo docker rm $(docker ps -a -q)

Thanks for the support