From db846f5794cad445d7b1e462648b541d4fde6e52 Mon Sep 17 00:00:00 2001 From: Samir AMZANI Date: Tue, 11 Jun 2024 11:01:46 +0200 Subject: [PATCH] fix: docker permissions --- 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