forked from igroff/forkulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (40 loc) · 1.14 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
44
45
46
# syntax=docker/dockerfile:1.3-labs
FROM ubuntu:14.04
# install shared packages that will be used by other steps
RUN <<DOC
apt-get update
apt-get install smbclient --assume-yes
apt-get install jq --assume-yes
apt-get install bc --assume-yes
apt-get install curl --assume-yes
apt-get install ssh --assume-yes
apt-get install unzip --assume-yes
rm -rf /var/lib/apt/lists/*
DOC
# Install AWS CLI v2
RUN <<DOC
set -e
curl -sL https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip -o /tmp/awscliv2.zip
unzip -q /tmp/awscliv2.zip -d /tmp
/tmp/aws/install
rm -rf /tmp/awscliv2.zip /tmp/aws
DOC
# Install Node 5.x
RUN <<DOC
#apt-get --assume-yes install nodejs npm
curl -fsSL https://deb.nodesource.com/setup_5.x | bash - &&\
apt-get install -y --force-yes nodejs
DOC
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
WORKDIR /forkulator
COPY package.json .
RUN <<DOC
npm config set strict-ssl false
npm install
DOC
COPY server.coffee .
# have to use tini, or coffee below will not respect any signals
ENTRYPOINT ["/tini", "--"]
CMD ["./node_modules/.bin/coffee", "server.coffee"]