Skip to content

Commit

Permalink
fix: docker permissions (#1464)
Browse files Browse the repository at this point in the history
Co-authored-by: asyncapi-bot <[email protected]>
  • Loading branch information
Amzani and asyncapi-bot authored Jun 11, 2024
1 parent ac6792b commit 747fc3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM node:20-alpine

# Set ARG to explicit value to build chosen version. Default is "latest"
ARG ASYNCAPI_CLI_VERSION=
ARG ASYNCAPI_CLI_VERSION=

# Create a non-root user
RUN addgroup -S myuser && adduser -S myuser -G myuser
Expand All @@ -22,6 +22,9 @@ RUN apk --update add git chromium && \
# Installing latest released npm package
RUN npm install --ignore-scripts -g @asyncapi/cli@"$ASYNCAPI_CLI_VERSION"

RUN chown -R myuser:myuser /usr/local/lib/node_modules && \
chown -R myuser:myuser /usr/local/bin

# Switch to the non-root user
USER myuser

Expand Down

0 comments on commit 747fc3e

Please sign in to comment.