-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
49 lines (35 loc) · 1.02 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
47
48
49
# THIS IS A WORK IN PROGRESS.
FROM node:10
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install git
RUN npm i -g [email protected]
ENV AWS_CRED_DIR "~/.aws"
ENV SSH_CRED_DIR "~/.ssh"
ENV TF_STATE_DIR './.tfstate'
VOLUME AWS_CRED_DIR
VOLUME SSH_CRED_DIR
VOLUME TF_STATE_DIR
ENV WORK_DIR "root/workdir"
RUN mkdir root/workdir
WORKDIR root/workdir
# Authorize SSH Host
RUN mkdir -p ~/.ssh && \
chmod 700 ~/.ssh && \
ssh-keyscan github.com > ~/.ssh/known_hosts
# Add the keys and set permissions
RUN echo "PLACEHOLDER" > ~/.ssh/id_rsa && \
echo "PLACEHOLDER" > ~/.ssh/id_rsa.pub && \
chmod 600 ~/.ssh/id_rsa && \
chmod 600 ~/.ssh/id_rsa.pub
# Authorize AWS Credentials
RUN mkdir -p ~/.aws && \
chmod 700 ~/.aws
RUN echo "PLACEHOLDER" > ~/.aws/credentials && \
chmod 600 ~/.aws/credentials
EXPOSE 3001
# https://serverfault.com/questions/189070/what-firewall-ports-need-to-be-open-to-allow-access-to-external-git-repositories
EXPOSE 22
EXPOSE 9418
EXPOSE 80
EXPOSE 443
CMD ["terraform-board"]