File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ RUN npm run build
23
23
24
24
# Creating final production image
25
25
FROM node:16-alpine
26
- RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
27
26
RUN apk add --no-cache vips-dev
28
27
ARG NODE_ENV=production
29
28
ENV NODE_ENV=${NODE_ENV}
@@ -33,8 +32,8 @@ WORKDIR /opt/app
33
32
COPY --from=build /opt/app ./
34
33
ENV PATH /opt/node_modules/.bin:$PATH
35
34
36
- RUN chown -R strapi:strapi /opt/app
37
- USER strapi
35
+ RUN chown -R node:node /opt/app
36
+ USER node
38
37
EXPOSE 1337
39
38
{%- if packageManager == "yarn" %}
40
39
CMD ["yarn", "start"]
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ FROM node:16-alpine
3
3
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev
4
4
ARG NODE_ENV=development
5
5
ENV NODE_ENV=${NODE_ENV}
6
- RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
7
6
8
7
WORKDIR /opt/
9
8
{%- if packageManager == "yarn" %}
@@ -17,8 +16,8 @@ RUN npm config set network-timeout 600000 -g && npm install
17
16
WORKDIR /opt/app
18
17
COPY . .
19
18
ENV 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
22
21
{%- if packageManager == "yarn" %}
23
22
RUN ["yarn", "build"]
24
23
{%- else %}
You can’t perform that action at this time.
0 commit comments