从网易云镜像中心下载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

相关文章:

  • 2021-05-18
  • 2021-09-08
猜你喜欢
  • 2021-11-20
  • 2021-07-07
  • 2021-05-16
  • 2021-11-10
  • 2021-11-21
相关资源
相似解决方案