Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf-h5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jianan
yd-csf-h5
Commits
281b235a
You need to sign in or sign up before continuing.
Commit
281b235a
authored
Oct 23, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(docker): 替换主配置 pid 路径到 /tmp,规避重复指令与 /run 不可写
parent
0075b471
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Dockerfile
+3
-2
No files found.
Dockerfile
View file @
281b235a
...
...
@@ -20,5 +20,6 @@ FROM nginx:alpine
COPY
--from=build /app/dist /usr/share/nginx/html
COPY
nginx.conf /etc/nginx/conf.d/default.conf
# 老内核(CentOS7)下容器内 /run 不可写,pid 改放 /tmp,避免 master 写 pid 失败而退出
CMD
["nginx", "-g", "daemon off; pid /tmp/nginx.pid;"]
# 老内核(CentOS7)下容器内 /run 不可写:把主配置里的 pid 从 /run 改到 /tmp
# (官方镜像默认是 daemon off,直接沿用,无需再传 pid 参数)
RUN
sed
-i
-E
's#^pid[[:space:]]+[^;]+;#pid /tmp/nginx.pid;#'
/etc/nginx/nginx.conf
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment