File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,8 @@ ARG NODE_ENV=development
5
5
ENV NODE_ENV=${NODE_ENV}
6
6
RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
7
7
8
- WORKDIR /opt/{%- if packageManager == "yarn" %}
9
- COPY package.json yarn.lock ./
10
- {%- else %}
11
- COPY package.json package-lock.json ./
12
- {% endif %}
13
- ENV PATH /opt/node_modules/.bin:$PATH
14
- RUN chown -R strapi:strapi /opt/
15
- USER strapi{%- if packageManager == "yarn" %}
8
+ WORKDIR /opt/
9
+ {%- if packageManager == "yarn" %}
16
10
COPY package.json yarn.lock ./
17
11
RUN yarn config set network-timeout 600000 -g && yarn install
18
12
{%- else %}
@@ -21,6 +15,9 @@ RUN npm config set network-timeout 600000 -g && npm install
21
15
{%- endif %}
22
16
23
17
WORKDIR /opt/app
18
+ ENV PATH /opt/node_modules/.bin:$PATH
19
+ RUN chown -R strapi:strapi /opt/app
20
+ USER strapi
24
21
COPY . .
25
22
{%- if packageManager == "yarn" %}
26
23
RUN ["yarn", "build"]
You can’t perform that action at this time.
0 commit comments