如何安装到centos中:
link: https://blog.csdn.net/nklinsirui/article/details/80610058
# step1. Set up repository
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# step2. Use Aliyun Docker
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# step3. install docker-ce latest
yum install docker-ce
# step4. enable docker service
systemctl enable docker
# step5. start docker
systemctl start docker
systemctl问题解决:
docker run -dit --privileged <image id> /usr/sbin/init
docker exec -it <container id> /bin/bash
容器转化为镜像:
docker commit -m "说明" -a "开发者" 72f1a8a0e394 仓库:tag
容器暴露端口:
docker run -d -p 5000:5000 training/webapp python app.py
容器重命名:
docker rename <old container-name> <new container-name>
网友评论