Skip to content

Commit

Permalink
fix: docker permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Amzani committed Jun 11, 2024
1 parent fbbce09 commit db846f5
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 db846f5

Please sign in to comment.