标签:客户端 sys lin ted 安装 block repos daemon source
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
?
sudo yum-config-manager --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo
?
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test
#可以关闭
sudo yum-config-manager --disable docker-ce-edge
1、common install
sudo yum install -y docker-ce
2、to install specific version
yum list docker-ce --showduplicates | sort -r
?
#docker-ce.x86_64 18.09.0.ce-1.el7.centos docker-ce-stablebash
?
sudo yum install docker-ce-<VERSION STRING>
3、start and verify
sudo systemctl start docker
sudo docker run hello-world
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
?
<output truncated>
?
sudo usermod -aG docker your-user
sudo yum remove docker-ce
sudo rm -rf /var/lib/docker
docker --version
sudo docker info
sudo docker run hello-world
sudo docker image ls
sudo docker container ls --all
## List Docker CLI commands
docker
docker container --help
?
## Display Docker version and info
docker --version
docker version
docker info
?
## Execute Docker image
docker run hello-world
?
## List Docker images
docker image ls
?
## List Docker containers (running, all, all in quiet mode)
docker container ls
docker container ls --all
docker container ls -aq
1、证书方式
sudo mkdir -p /etc/docker/certs.d/192.192.49.87
sudo cp /var/docker-data/certs/domain.crt /etc/docker/certs.d/192.192.49.87/ca.crt
?
#可能需要OS级信任
sudo cp /etc/dockercerts/domain.crt /etc/pki/ca-trust/source/anchors/192.192.49.87.crt
sudo update-ca-trust
?
2、http方式
#或者关闭安全
sudo cat << EOF > /etc/docker/daemon.json
{
"insecure-registries" : ["192.192.49.87"]
}
EOF
?
sudo systemctl restart docker
安装
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
?
sudo chmod +x /usr/local/bin/docker-compose
?
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
标签:客户端 sys lin ted 安装 block repos daemon source
原文地址:https://www.cnblogs.com/fatt/p/10320407.html