File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515
1616# 使用非 root 用户运行,避免 GitHub Actions Runner 报 "Must not run with sudo"
1717# UID/GID 1000 与常见宿主机首用户一致,挂载 runners 卷时权限更易匹配
18- RUN groupadd -g 1000 app && useradd -r -u 1000 -g app -d /app -s /bin/bash app
18+ # 基础镜像可能已有 GID 1000,先尝试创建组,失败则复用已有组
19+ RUN (groupadd -g 1000 app 2>/dev/null || true) && useradd -r -u 1000 -g 1000 -d /app -s /bin/bash app
1920
2021WORKDIR /app
2122COPY --from=builder /app/runner-manager .
2223COPY --from=builder /app/config.yaml ./config.yaml
2324RUN mkdir -p /app/scripts /app/runners
2425COPY scripts/install-runner.sh /app/scripts/install-runner.sh
25- RUN chmod +x /app/scripts/install-runner.sh && chown -R app:app /app
26+ RUN chmod +x /app/scripts/install-runner.sh && chown -R 1000:1000 /app
2627
2728USER app
2829EXPOSE 8080
You can’t perform that action at this time.
0 commit comments