-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
75 lines (67 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM golang:latest AS websocketd
ENV CGO_ENABLED=0
RUN go install github.com/ibuetler/websocketd@latest
FROM hackinglab/alpine-base-hl:3.2
LABEL maintainer=<[email protected]>
ENV TERRAFORM_VERSION=0.15.3
#ENV TERRAFORM_VERSION=1.6.2
COPY --from=websocketd /go/bin/websocketd /usr/bin/websocketd
# Add the files
ADD root /
RUN apk add --no-cache --update nginx \
vim \
nginx \
curl \
util-linux \
dcron \
screen \
openssl \
openssh \
python3 \
proxychains-ng \
py3-pip && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
\
echo "**** install pip ****" && \
pip3 install --no-cache --upgrade pip setuptools wheel --break-system-packages && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscliv2.zip && \
unzip /tmp/awscliv2.zip -d /opt/ && \
/opt/aws/install -i /usr/local/aws-cli -b /usr/local/bin && \
curl -sSL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
-o /tmp/terraform.zip && \
unzip /tmp/terraform.zip -d /usr/bin && \
rm /tmp/terraform.zip && \
chown -R nginx:www-data /var/lib/nginx && \
chown -R nginx:www-data /opt/www && \
rm -rf /var/cache/apk/*
# Terraform CLI
RUN apk add --no-cache --update \
curl \
tar \
openssl \
sudo \
bash \
jq \
python3 \
postgresql-client \
postgresql && \
\
apk add --no-cache --virtual=build \
gcc \
libffi-dev \
musl-dev \
openssl-dev \
make \
python3-dev && \
\
pip3 install virtualenv --break-system-packages && \
\
python3 -m virtualenv /opt/azure-cli && \
/opt/azure-cli/bin/python -m pip --no-cache-dir install azure-cli packaging azure-mgmt-resource --break-system-packages && \
chmod +x /usr/bin/az && \
\
apk del build && \
rm -rf /var/cache/apk/*
# Expose the ports for nginx
EXPOSE 80