-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
39 lines (27 loc) · 887 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
36
37
38
39
# Build Stage
FROM node:lts as build
# Create app directory
WORKDIR /tmp/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY . .
# Install NPM and Reactium registry dependencies
RUN npx -p @atomic-reactor/cli arcli install
RUN npm prune --production
# Begin Deployable Stage - Ignores layers above in final image
FROM node:lts
# Create app directory
WORKDIR /usr/src/app
# Server dependencies
COPY --from=build /tmp/app/package.json ./package.json
COPY --from=build /tmp/app/node_modules ./node_modules
# Actinium modules from Reactium registry
COPY --from=build /tmp/app/actinium_modules ./actinium_modules
# The server source
COPY --from=build /tmp/app/src ./src
COPY --from=build /tmp/app/.core ./.core
RUN chown -R node /usr/src/app
USER node
EXPOSE 9000
CMD [ "npm", "start" ]