linux安装
- yum list installed | grep docker
- yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- yum list | grep docker
- yum install -y docker-ce docker-ce-cli containerd.io
- vi /etc/docker/daemon.json
{ "registry-mirrors": ["镜像"] }
- systemctl start docker
- systemctl enable docker
- systemctl status docker
Docker安装ngnix
- docker pull nginx
- docker run -d --name my-nginx -p 80:80 -v /root/nginx-data/nginx.conf:/etc/nginx/nginx.conf nginx
- docker container list -a
- docker logs 649bd659dd90
- docker exec -it 649bd659dd90 /bin/bash
- docker stop 649bd659dd90
- docker rm 649bd659dd90