Commit 0075b471 by jianan

fix(docker): pid 改放 /tmp,规避老内核下 /run 不可写致 nginx 退出

parent 3a7e11b7
...@@ -19,3 +19,6 @@ RUN npm run build ...@@ -19,3 +19,6 @@ RUN npm run build
FROM nginx:alpine FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/conf.d/default.conf
# 老内核(CentOS7)下容器内 /run 不可写,pid 改放 /tmp,避免 master 写 pid 失败而退出
CMD ["nginx", "-g", "daemon off; pid /tmp/nginx.pid;"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment