Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
style(docker): reorder instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Frazer Smith committed Jun 1, 2021
1 parent 8942f2a commit d40996a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ FROM node:lts-alpine
# Workdir
WORKDIR /usr/app

# Copy and install packages
COPY . .
# Git is needed to install node modules from GitHub
RUN apk add --no-cache git=2.24.4-r0
RUN npm ci --ignore-scripts && npm cache clean --force

# Pre-emptively make logs directory if used for logs storage set
# by LOG_ROTATION_FILENAME env variable
RUN mkdir ./logs/ && chown -R node ./logs/
# If appropriate env file missing, use template
RUN cp .env.template .env
# Git is needed to install node modules from github
RUN apk add --no-cache git=2.24.4-r0
# Install dependencies
RUN npm ci --ignore-scripts && npm cache clean --force

# Node images provide 'node' unprivileged user to run apps and prevent
# privilege escalation attacks
Expand Down

0 comments on commit d40996a

Please sign in to comment.