docker脚本

查看容器所有信息 # docker inspect f0b1c8ab3633
查看容器日志 # docker container logs f0b1c8ab3633
查看容器里的进程 # docker top f0b1c8ab3633

vim jb.sh

yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum-config-manager --add-repo  http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
yum -y install docker-ce docker-ce-cli
systemctl start docker
systemctl enable docker

你可能感兴趣的:(docker脚本)