File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,14 +5,8 @@ ARG NODE_ENV=development
55ENV NODE_ENV=${NODE_ENV}
66RUN addgroup -g 1001 strapi && adduser -u 1001 -G strapi -s /bin/sh -D strapi
77
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" %}
1610COPY package.json yarn.lock ./
1711RUN yarn config set network-timeout 600000 -g && yarn install
1812{%- else %}
@@ -21,6 +15,9 @@ RUN npm config set network-timeout 600000 -g && npm install
2115{%- endif %}
2216
2317WORKDIR /opt/app
18+ ENV PATH /opt/node_modules/.bin:$PATH
19+ RUN chown -R strapi:strapi /opt/app
20+ USER strapi
2421COPY . .
2522{%- if packageManager == "yarn" %}
2623RUN ["yarn", "build"]
You can’t perform that action at this time.
0 commit comments