File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ RUN npm run build
2323
2424# Creating final production image
2525FROM node:16-alpine
26- RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
2726RUN apk add --no-cache vips-dev
2827ARG NODE_ENV=production
2928ENV NODE_ENV=${NODE_ENV}
@@ -33,8 +32,8 @@ WORKDIR /opt/app
3332COPY --from=build /opt/app ./
3433ENV PATH /opt/node_modules/.bin:$PATH
3534
36- RUN chown -R strapi:strapi /opt/app
37- USER strapi
35+ RUN chown -R node:node /opt/app
36+ USER node
3837EXPOSE 1337
3938{%- if packageManager == "yarn" %}
4039CMD ["yarn", "start"]
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ FROM node:16-alpine
33RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
44ARG NODE_ENV=development
55ENV NODE_ENV=${NODE_ENV}
6- RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
76
87WORKDIR /opt/
98{%- if packageManager == "yarn" %}
@@ -17,8 +16,8 @@ RUN npm config set network-timeout 600000 -g && npm install
1716WORKDIR /opt/app
1817COPY . .
1918ENV PATH /opt/node_modules/.bin:$PATH
20- RUN chown -R strapi:strapi /opt/app
21- USER strapi
19+ RUN chown -R node:node /opt/app
20+ USER node
2221{%- if packageManager == "yarn" %}
2322RUN ["yarn", "build"]
2423{%- else %}
You can’t perform that action at this time.
0 commit comments