Skip to content

Commit

Permalink
Fix ambiguous flags in Dockerfile example (#33417)
Browse files Browse the repository at this point in the history
* Fix ambiguous flags in Dockerfile example

At least with Docker xx this Dockerfile fails to both `adduser` and `addgroup` commands due to ambiguous flags. The error message for example for `addgroup` is:

```
#5 0.292 Option g is ambiguous (gecos, gid, group)
#5 0.292 Option s is ambiguous (shell, system)
```
This PR switches both commands to use the long-format flags. I think they are also more understandable for the readers of the Dockerfile.

* Apply suggestions from code review

Co-authored-by: Balázs Orbán <info@balazsorban.com>

Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
  • Loading branch information
3 people committed Feb 5, 2022
1 parent 8aa3620 commit 97b5c0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/with-docker/Dockerfile
Expand Up @@ -23,8 +23,8 @@ WORKDIR /app

ENV NODE_ENV production

RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

# You only need to copy next.config.js if you are NOT using the default configuration
# COPY --from=builder /app/next.config.js ./
Expand Down

0 comments on commit 97b5c0a

Please sign in to comment.