diff --git a/sources/packages/backend/apps/api/Dockerfile b/sources/packages/backend/apps/api/Dockerfile index 710ac17276..635b43c02c 100644 --- a/sources/packages/backend/apps/api/Dockerfile +++ b/sources/packages/backend/apps/api/Dockerfile @@ -23,5 +23,10 @@ RUN npm run build api # Exposing application port EXPOSE ${PORT} +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:api" ] \ No newline at end of file diff --git a/sources/packages/backend/apps/db-migrations/Dockerfile b/sources/packages/backend/apps/db-migrations/Dockerfile index e215118aa5..6f1b29d8dc 100644 --- a/sources/packages/backend/apps/db-migrations/Dockerfile +++ b/sources/packages/backend/apps/db-migrations/Dockerfile @@ -15,5 +15,10 @@ COPY tsconfig.json ./ COPY tsconfig.build.json ./ COPY env-setup.js ./ +# Grant access to group 0 to allow npm v9 to work +# See: https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html#use-uid_create-images +RUN chgrp -R 0 ./.npm && \ + chmod -R g=u ./.npm + # Entry point CMD [ "npm", "run", "start:prod:db-migrations" ]