- docker run -p 80:80 --name nginx -d nginx:1.10
- docker container cp nginx:/etc/nginx . //将Nginx文件赋值到当前目录,并改名
- docker stop nginx
- docker rm nginx
- docker run -p 80:80 --name nginx -v /mydata/nginx/html:/usr/share/nginx/html -v /mydata/nginx/logs:/var/log/nginx -v /mydata/nginx/conf:/etc/nginx -d nginx:1.10
- cd /mydata/nginx/html vim index.html 编写内容
这就安装好Nginx了
Docker安装nginx
最新推荐文章于 2022-05-18 16:32:57 发布