@@ -3,20 +3,24 @@ FROM python:3.11-alpine
33ENV TFENV_VERSION v3.0.0
44ENV TGENV_VERSION v0.0.3
55ENV TFLINT_VERSION v0.44.1
6+ ENV TFSWITCH_VERSION 0.13.1300
67ENV AZURE_CLI_VERSION 2.43.0
78
8- RUN apk add --no-cache curl bash unzip git openssh-client jq \
9- gcc musl-dev python3-dev libffi-dev openssl-dev cargo make && \
9+ RUN apk add --no-cache curl bash git openssh-client jq && \
10+ apk add --no-cache --virtual builddeps unzip gcc musl-dev python3-dev libffi-dev openssl-dev cargo make && \
1011 pip install --upgrade pip && pip install azure-cli==${AZURE_CLI_VERSION} && \
1112 curl --fail --silent -L -o /tmp/tfenv.zip https://github.com/tfutils/tfenv/archive/refs/tags/${TFENV_VERSION}.zip && \
1213 curl --fail --silent -L -o /tmp/tgenv.zip https://github.com/cunymatthieu/tgenv/archive/refs/tags/${TGENV_VERSION}.zip && \
1314 curl --fail --silent -L -o /tmp/tflint.zip https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/tflint_linux_amd64.zip && \
15+ curl --fail --silent -L -o /tmp/tfswitch-install.sh https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh && \
16+ chmod +x /tmp/tfswitch-install.sh && /tmp/tfswitch-install.sh -b /usr/local/bin "${TFSWITCH_VERSION}" && \
1417 unzip -u /tmp/tfenv -d /tmp && mv /tmp/tfenv-* ~/.tfenv/ && \
1518 unzip -u /tmp/tgenv -d /tmp && mv /tmp/tgenv-* ~/.tgenv/ && \
1619 unzip -u /tmp/tflint -d /usr/local/bin && \
1720 ln -s ~/.tfenv/bin/* /usr/local/bin && \
1821 ln -s ~/.tgenv/bin/* /usr/local/bin && \
19- rm -f /tmp/*.zip && tfenv --version && tgenv --version && tflint --version && az --version && \
22+ rm -rf /tmp && apk del builddeps && \
23+ tfenv --version && tgenv --version && tflint --version && az --version && tfswitch --version && \
2024 adduser -g "iac-executor" -D iac-executor
2125
2226USER iac-executor
0 commit comments