docker安装nginx

nginxs 2020-08-18

一、拉取

docker pull nginx

二、启动

启动前需要创建conf目录,并将容器的配置文件cp到宿主机目录下。docker run -d --name nginx -v /home/docker/nginx/conf:/etc/nginx -v /home/docker/nginx/html:/usr/share/nginx/html -v /home/docker/nginx/logs:/var/log/nginx -p 81:80 -p 8021:8021 --restart=always docker.io/nginx

三、配置

相关推荐