修复Dockerfile中使用addgroup/adduser命令导致的兼容性问题,改用groupadd/useradd 修正CI配置中分支条件判断错误,将dev改为develop
This commit is contained in:
@@ -5,8 +5,8 @@ FROM oven/bun:latest AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Create a non-root user for running the production application
|
||||
RUN addgroup --system --gid 1001 nodejs \
|
||||
&& adduser --system --uid 1001 nextjs
|
||||
RUN groupadd -r -g 1001 nodejs \
|
||||
&& useradd -r -u 1001 -g nodejs nextjs
|
||||
|
||||
# Change to non-root user
|
||||
USER nextjs
|
||||
|
||||
@@ -5,8 +5,8 @@ FROM oven/bun:latest AS base
|
||||
WORKDIR /app
|
||||
|
||||
# Create non-root user and set permissions
|
||||
RUN addgroup --system --gid 1001 nodejs \
|
||||
&& adduser --system --uid 1001 nextjs
|
||||
RUN groupadd -r -g 1001 nodejs \
|
||||
&& useradd -r -u 1001 -g nodejs nextjs
|
||||
|
||||
# Copy build output and static files
|
||||
COPY ./apps/user/.next/standalone ./
|
||||
|
||||
Reference in New Issue
Block a user