refactor: update user and group creation in Dockerfile for improved clarity
This commit is contained in:
parent
595f6aa24d
commit
ff92067085
1 changed files with 3 additions and 2 deletions
|
|
@ -24,8 +24,9 @@ WORKDIR /app
|
|||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN addgroup -g 1001 -S nodejs
|
||||
RUN adduser -D -H -u 1001 -G nodejs -s /sbin/nologin -S nextjs
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends shadow && rm -rf /var/lib/apt/lists/*
|
||||
RUN groupadd -g 1001 nodejs
|
||||
RUN useradd -m -u 1001 -g nodejs -s /sbin/nologin nextjs
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue