千家信息网

docker 入门24小时

发表于:2024-11-11 作者:千家信息网编辑
千家信息网最后更新 2024年11月11日,dockerdocker install For Centos7yum remove docker*yum install -y yum-utils device-mapper-persistent-
千家信息网最后更新 2024年11月11日docker 入门24小时

docker

docker install For Centos7

yum remove docker*yum install -y yum-utils device-mapper-persistent-data lvm2yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repoyum makecache fastyum -y install docker-cesystemctl enable docker && systemctl start docker

docker run hello-world

docker run hello-world

docker run

docker imagesdocker pull centosdocker run --name centos1 -itd -v /opt:/opt:rw -p 80:80 centos

docker manager

# login containerdocker attach centos1# logout containerctrl+p ctrl+q

docker local repo

docker pull registrydocker run --name localrepo -p 5000:5000 registrydocker tag centos 127.0.0.1:5000/justin/centos:v1docker push 127.0.0.1:5000/justin/centos:v1
0