www-jrtorres042-github-enterprise-org
/
git_microsoft-powershell_achive-credential_covid-19_live-cam_usaspending-website_diff-1
Public template
forked from fedspendingtransparency/usaspending-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (16 loc) · 788 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM node:14.17.0
# Default environment variables
ENV ENV=prod USASPENDING_API=https://api.usaspending.gov/api/ MAPBOX_TOKEN='' GA_TRACKING_ID=''
RUN mkdir /node-workspace && mkdir /test-results
# Copy JUST the package files first.
# This allows Docker to NOT re-fetch all NPM packages if neither of these two files
# have changed, and instead use the cached layer containing all those dependent packages.
# Greatly speeds up repeated docker build calls on the same machine (like CI/CD boxes)
# by leveraging the docker image cache
COPY package.json package-lock.json /node-workspace/
WORKDIR /node-workspace
# Clean Node module dependencies and install them fresh
RUN npm ci
# Now copy the remaining source files
# Files in .dockerignore will not be copied
COPY . /node-workspace