From 747fc3e46ff83b0593190a5c6b2e56294ccc79dd Mon Sep 17 00:00:00 2001 From: samz Date: Tue, 11 Jun 2024 11:08:23 +0200 Subject: [PATCH] fix: docker permissions (#1464) Co-authored-by: asyncapi-bot --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index decb7a8175a..c2d7945239f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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