forked from thecommons-urbit/chess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (23 loc) · 768 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# syntax=docker/dockerfile:1
FROM node:slim
# An environment variable made popular by the express web server framework which
# checks the value when Node is run and may take different actions. The typical
# values are 'dev' and 'prod'.
ENV NODE_ENV=prod
WORKDIR /app/frontend
# Install dependencies
COPY ["src/frontend/package.json", "./"]
RUN npm install --verbose
# Copy files from source
COPY ["src/frontend/", "./"]
RUN rm package-lock.json
# Build frontend
RUN npm run-script lint
RUN npm run-script build
# Copy output files
RUN mkdir output
RUN cp -rfL html/index.html css js output/
# Assumes that some local dir is mounted as a volume at /app/output
# (e.g. the way ./bin/build.sh calls 'docker run')
WORKDIR /app
CMD cp -rfL frontend/output/* output/