【实用的docker小技巧】部署docker
以centos7.*为例 12345678#更新yum包yum update -y#下载dockeryum intall -y docker#启动dockersystemctl start docker #开机自启dockersystemctl enable docker 如果运行容器的时候忘记设置开机自启就可以执行下面 1docker update --restart=always 容器名或者ID 和容器同用网络 1--net=host 换阿里云源 1vi /etc/docker/daemon.json 1{"registry-mirrors": ["https://pee6w651.mirror.aliyuncs.com"]} 安装docker-compose 12sudo curl -L https://get.daocloud.io/docker/compose/releases/downl...