-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
41 lines (31 loc) · 1.08 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
FROM alpine:3.13
RUN \
apk update && \
apk add bash py-pip && \
apk add --virtual=build gcc libffi-dev musl-dev openssl-dev python3-dev make && \
apk add curl jq python3 ca-certificates git openssl unzip wget mysql-client libc6-compat && \
pip --no-cache-dir install -U pip && \
pip install azure-cli && \
apk del --purge build
ARG PROVIDERS
VOLUME ["/data"]
WORKDIR /data
ENV TERRAFORM_VERSION=1.5.5
COPY terraform_${TERRAFORM_VERSION}_linux_amd64.zip /tmp
RUN cd /tmp && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip -d /usr/bin
COPY retrieve_tf_provider.sh /tmp
COPY ossutil /usr/bin
ENV RETRIEVE_TF_PROVIDER=/tmp/retrieve_tf_provider.sh
# default provider
RUN $RETRIEVE_TF_PROVIDER hashicorp random 3.1.0
RUN $RETRIEVE_TF_PROVIDER hashicorp alicloud 1.187.0
# additional designated provider
RUN if [ "${PROVIDERS}" = "" ] ;then \
echo "There is no additional designated provider"; \
else \
for provider in ${PROVIDERS//,/ }; do \
$RETRIEVE_TF_PROVIDER ${provider//\// }; \
done \
fi
ENTRYPOINT ["tail", "-f", "/dev/null"]