十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
yum remove docker*
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce
systemctl enable docker && systemctl start docker
docker run hello-world
docker images
docker pull centos
docker run --name centos1 -itd -v /opt:/opt:rw -p 80:80 centos
# login container
docker attach centos1
# logout container
ctrl+p ctrl+q
docker pull registry
docker run --name localrepo -p 5000:5000 registry
docker tag centos 127.0.0.1:5000/justin/centos:v1
docker push 127.0.0.1:5000/justin/centos:v1