-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.raw
53 lines (43 loc) · 1.17 KB
/
Dockerfile.raw
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
47
48
49
50
51
52
53
FROM $DOCKER_REPO/node:8.3.0
RUN apt-get update -y
# Install git
RUN apt-get install -y git
# Install jq
RUN apt-get install -y jq
# Install docker
RUN apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/debian \
$(lsb_release -cs) \
stable"
RUN apt-get update -y
RUN apt-get install -y docker-ce
# Install aws cli
RUN apt-get install -y python2.7 python2.7-dev
RUN apt-get install -y python-pip
RUN pip install --upgrade --user awscli
# Copy git, gcp & aws config & credentials
COPY gitconfig gitconfig
COPY aws-$STAGE aws-$STAGE
COPY gcp-$STAGE.json .
# Installing node dependencies
COPY package.json .
RUN npm install
# Bundle app source
COPY base-image base-image
COPY base-image.sh .
COPY custom-image custom-image
COPY custom-image.sh .
COPY app.sh .
COPY app-deploy.sh .
COPY app-deploy-notification.sh .
COPY server.js .
EXPOSE 80
CMD export PATH=$PATH:/root/.local/bin/ && cp gitconfig /root/.gitconfig && cp -r aws-$STAGE /root/.aws \
&& npm start