-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile
43 lines (34 loc) · 1.19 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
42
43
FROM gcr.io/google_appengine/nodejs
# Undo the env variable setting from the google nodejs env.
# We set NODE_ENV ourself when we run the server, rather than have a global
# setting which messes with npm install.
ENV NODE_ENV ''
RUN apt-get -q update && \
apt-get install --no-install-recommends -y -q \
nano less memcached rsync vim
# Install node/npm using LTS version
#
RUN install_node 8.9.0
# Install Yarn.
# Note: because this is running as super-user in docker, we need to specify the
# --unsafe-perm flag to allow npm not to worry about downgrading its
# permissions.
#
RUN npm install --unsafe-perm -g yarn
# `angular-cli` is used to build the app.
# `ts-node` allows typesscipt scripts to executed inline, like node/js.
# `typescript` is the programming language and compiler for javascript.
# `typings` provides type definitions for typescript needed to compile code.
RUN yarn global add \
angular-cli \
ts-node \
typings
# Add local files into the docker filespace.
# Assumes that .dockerfile ignores nodes node_modules
ADD . /app/
WORKDIR /app/
RUN yarn install
RUN yarn run build:prod
# Assumes: `EXPOSE 8080` and `ENV PORT 8080`
CMD yarn start:prod-server