Skip to content

Commit 98c0261

Browse files
author
Simen Daehlin
committed
fix(dockerfile.liquid): fixed the wrong order which would cause EACCESS error
Fixed an issue reported #77 Fix #77
1 parent f957839 commit 98c0261

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

templates/Dockerfile.liquid

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@ ARG NODE_ENV=development
55
ENV NODE_ENV=${NODE_ENV}
66
RUN 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" %}
1610
COPY package.json yarn.lock ./
1711
RUN 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

2317
WORKDIR /opt/app
18+
ENV PATH /opt/node_modules/.bin:$PATH
19+
RUN chown -R strapi:strapi /opt/app
20+
USER strapi
2421
COPY . .
2522
{%- if packageManager == "yarn" %}
2623
RUN ["yarn", "build"]

0 commit comments

Comments
 (0)