从网易云镜像中心下载https://c.163yun.com/hub#/library/repository/info?repoId=2967
docker pull hub.c.163.com/library/nginx:latest

查看nginxjingxiang

docker images

docker 安装nginx

给nginx分配端口,并运行

容器中nginx默认占用80,我们把容器的80端口映射到本机18080端口
docker run -d -p 18080:80 --name nginx hub.c.163.com/library/nginx

docker 安装nginx

访问:http://localhost:18080/
docker 安装nginx

相关文章: