docker部署nginx服务:
docker run -d --name nginx-server -v /opt/fuwu/nginx-server:/usr/share/html/index.html:ro nginx:latest Unable to find image 'nginx:latest' locally latest: Pulling from library/nginx af107e978371: Pull complete 336ba1f05c3e: Pull complete 8c37d2ff6efa: Pull complete 51d6357098de: Pull complete 782f1ecce57d: Pull complete 5e99d351b073: Pull complete 7b73345df136: Pull complete Digest: sha256:2bdc49f2f8ae8d8dc50ed00f2ee56d00385c6f8bc8a8b320d0a294d9e3b49026 Status: Downloaded newer image for nginx:latest 73fe1e9f25767a4e762ac2d49992188cab68c55136b6cc4a3152b4323a6433dd -d后台启动 --name给容器起个名字 -v 宿主机共享容器的目录 nginx:latest什么镜像 nginx的最新镜像: 标签:Pull,complete,部署,image,nginx,docker,latest From: https://www.cnblogs.com/cherishthepresent/p/17924876.html