forked from canonical-web-and-design/tutorials.ubuntu.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 706 Bytes
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
FROM ubuntu:xenial
# System dependencies
RUN apt-get update && apt-get install --yes curl xz-utils
# Get nodejs
RUN mkdir /usr/lib/nodejs && \
curl https://nodejs.org/dist/v6.11.3/node-v6.11.3-linux-x64.tar.xz | tar -xJ -C /usr/lib/nodejs && \
mv /usr/lib/nodejs/node-v6.11.3-linux-x64 /usr/lib/nodejs/node-v6.11.3
# Set nodejs paths
ENV NODEJS_HOME=/usr/lib/nodejs/node-v6.11.3
ENV PATH=$NODEJS_HOME/bin:$PATH
# Node dependencies
RUN npm install --global yarn
# Set git commit ID
ARG COMMIT_ID
ENV COMMIT_ID=$COMMIT_ID
RUN test -n "${COMMIT_ID}"
# Import code, install code dependencies
WORKDIR /srv
ADD . .
# Setup commands to run server
ENTRYPOINT ["yarn", "run", "prpl-server"]
CMD [""]