devin15 commited on
Commit
c9332b9
·
verified ·
1 Parent(s): ba8387b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -96,7 +96,7 @@ RUN cd /tmp && \
96
  chown -R nginx:nginx /var/log/nginx
97
 
98
  # 创建nginx配置文件(修改端口为7860)
99
- # 屏蔽警告: nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
100
  RUN echo 'user nginx;' > /etc/nginx/nginx.conf && \
101
  echo 'worker_processes auto;' >> /etc/nginx/nginx.conf && \
102
  echo 'error_log /var/log/nginx/error.log;' >> /etc/nginx/nginx.conf && \
@@ -178,7 +178,7 @@ RUN echo '#!/bin/sh' > /start.sh && \
178
  echo 'nginx -t' >> /start.sh && \
179
  echo 'echo ""' >> /start.sh && \
180
  echo 'echo "Starting nginx on port 7860..."' >> /start.sh && \
181
- echo 'nginx -g "daemon off;"' >> /start.sh && \
182
  chmod +x /start.sh
183
 
184
  # 设置工作目录
 
96
  chown -R nginx:nginx /var/log/nginx
97
 
98
  # 创建nginx配置文件(修改端口为7860)
99
+ # 屏蔽警告?: nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
100
  RUN echo 'user nginx;' > /etc/nginx/nginx.conf && \
101
  echo 'worker_processes auto;' >> /etc/nginx/nginx.conf && \
102
  echo 'error_log /var/log/nginx/error.log;' >> /etc/nginx/nginx.conf && \
 
178
  echo 'nginx -t' >> /start.sh && \
179
  echo 'echo ""' >> /start.sh && \
180
  echo 'echo "Starting nginx on port 7860..."' >> /start.sh && \
181
+ echo 'sudo nginx -g "daemon off;"' >> /start.sh && \
182
  chmod +x /start.sh
183
 
184
  # 设置工作目录