安装nginx docker镜像
docker pull nginx
mkdir -p /usr/local/nginx/www /usr/local/nginx/logs /usr/local/nginx/conf
创建配置文件
touch /usr/local/nginx/conf/nginx.conf
运行nginx
docker run -d -p 80:80 --name nginx80 -v /usr/local/nginx/www:/usr/share/nginx/html -v /usr/local/nginx/conf/nginx.conf:/etc/nginx/nginx.conf -v /usr/local/nginx/logs:/var/log/nginx nginx
配置文件配置好即可
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)