-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
41 lines (36 loc) · 1.22 KB
/
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
40
41
# --------------------------------------
# build from a base image that includes
# everything needed to run Node.js v8.2.1
FROM node:8.2.1
# --------------------------------------
# --------------------------------------
# create a folder for the app, from
# which everything will be run
RUN mkdir -p /var/app
WORKDIR /var/app
# --------------------------------------
# --------------------------------------
# cache npm modules for faster builds
RUN yarn global add nodemon [email protected] flow-bin
COPY ./package.json /var/app
COPY ./yarn.lock /var/app
RUN yarn
# --------------------------------------
# --------------------------------------
# put the app into the image. be sure to
# have a .dockerignore file so you only
# copy the files you need
COPY ./ /var/app
# --------------------------------------
# --------------------------------------
# set environment variables and tcp/ip
# port numbers that will be used
ENV NODE_ENV=development NODE_PATH=./lib:.
EXPOSE 3000 5858 35729
# --------------------------------------
# --------------------------------------
# used for performance improvement when
# installing modules while the container
# is running
VOLUME /var/app/node_modules
# --------------------------------------