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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -35,8 +35,8 @@ RUN apk update && apk upgrade && \
35
  && rm -rf /var/cache/apk/*
36
 
37
  # 创建nginx用户和组
38
- RUN addgroup -g 101 -S nginx && \
39
- adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx
40
 
41
  # 下载并编译安装nginx主线版本
42
  RUN cd /tmp && \
@@ -97,8 +97,8 @@ RUN cd /tmp && \
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 && \
103
  echo 'pid /var/run/nginx.pid;' >> /etc/nginx/nginx.conf && \
104
  echo '' >> /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 'sudo nginx -g "daemon off;"' >> /start.sh && \
182
  chmod +x /start.sh
183
 
184
  # 设置工作目录
 
35
  && rm -rf /var/cache/apk/*
36
 
37
  # 创建nginx用户和组
38
+ # RUN addgroup -g 101 -S nginx && \
39
+ # adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx
40
 
41
  # 下载并编译安装nginx主线版本
42
  RUN cd /tmp && \
 
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
+ RUN echo 'worker_processes auto;' >> /etc/nginx/nginx.conf && \
102
  echo 'error_log /var/log/nginx/error.log;' >> /etc/nginx/nginx.conf && \
103
  echo 'pid /var/run/nginx.pid;' >> /etc/nginx/nginx.conf && \
104
  echo '' >> /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 'nginx -g "daemon off;"' >> /start.sh && \
182
  chmod +x /start.sh
183
 
184
  # 设置工作目录