在centos7环境下安装Docker
The best investment is to invest in yourself.最好的投资就是投资自己。
uname -r
sudo yum update
sudo yum remove docker docker-common docker-selinux docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
这是因为我之前下载过、
#设置yum源:
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
sudo yum install docker-ce-17.12.0.ce
sudo systemctl start docker
sudo systemctl enable docker
docker version
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
虽然说docker近几年在国内安装的cdn已经够快的了,但是阿里云还是YYDS,跟着命令敲,一定不会差
systemctl start docker
systemctl stop docker
systemctl status docker
systemctl restart docker
docker ps
docker ps -a
docker images
docker info
docker version
docker pull
docker run ${容器启动参数}
er信息 docker info
#查看当前docker的版本 docker version
#拉取镜像 docker pull
#启动镜像/ docker run ${容器启动参数}
|