forked from parse-community/parse-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (25 loc) · 760 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
31
32
33
34
35
#
# --- Base Node Image ---
FROM node:8-alpine AS base
WORKDIR /src
# Copy package.json first to benefit from layer caching
COPY package*.json ./
RUN npm install --only=production
# Copy production node_modules aside for later
RUN cp -R node_modules prod_node_modules
# Install remaining dev dependencies
RUN npm install
COPY . /src
# Run all webpack build steps
RUN npm run prepublish && npm run build
#
# --- Production Image ---
FROM node:8-alpine AS release
WORKDIR /src
# Copy production node_modules
COPY --from=base /src/prod_node_modules /src/node_modules
COPY --from=base /src/package*.json /src/
# Copy compiled src dirs
COPY --from=base /src/Parse-Dashboard/ /src/Parse-Dashboard/
USER node
ENTRYPOINT ["node", "Parse-Dashboard/index.js"]