Skip to content

Commit

Permalink
Fix npm cache permission issues by setting new dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgxvii committed Sep 28, 2024
1 parent 49aed05 commit 34c130e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ RUN mkdir -p /app

WORKDIR /app

ENV NPM_CONFIG_CACHE=/home/node/.npm

COPY package*.json ./

RUN mkdir -p $NPM_CONFIG_CACHE && chown -R node:node $NPM_CONFIG_CACHE

RUN npm install

COPY . .
Expand All @@ -15,5 +19,4 @@ RUN npm run build

EXPOSE 3000

# Start the app on port 4455 as recommended by ory
CMD ["npm", "start", "--", "-p", "3000"]

0 comments on commit 34c130e

Please sign in to comment.