Skip to content

Commit 93c395e

Browse files
committed
feat: Improve container size
1 parent b93ffdd commit 93c395e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,20 @@ ENV TFLINT_VERSION v0.44.1
66
ENV TFSWITCH_VERSION 0.13.1300
77
ENV AZURE_CLI_VERSION 2.43.0
88

9-
RUN apk add --no-cache curl bash unzip git openssh-client jq \
10-
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 && \
1111
pip install --upgrade pip && pip install azure-cli==${AZURE_CLI_VERSION} && \
1212
curl --fail --silent -L -o /tmp/tfenv.zip https://github.com/tfutils/tfenv/archive/refs/tags/${TFENV_VERSION}.zip && \
1313
curl --fail --silent -L -o /tmp/tgenv.zip https://github.com/cunymatthieu/tgenv/archive/refs/tags/${TGENV_VERSION}.zip && \
1414
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 https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | TAG="${TFSWITCH_VERSION}}" bash \
15+
curl --fail --silent -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/release/install.sh | TAG="${TFSWITCH_VERSION}" bash && \
1616
unzip -u /tmp/tfenv -d /tmp && mv /tmp/tfenv-* ~/.tfenv/ && \
1717
unzip -u /tmp/tgenv -d /tmp && mv /tmp/tgenv-* ~/.tgenv/ && \
1818
unzip -u /tmp/tflint -d /usr/local/bin && \
1919
ln -s ~/.tfenv/bin/* /usr/local/bin && \
2020
ln -s ~/.tgenv/bin/* /usr/local/bin && \
21-
rm -f /tmp/*.zip && tfenv --version && tgenv --version && tflint --version && az --version && tfswitch --version && \
21+
rm -f /tmp/*.zip && apk del builddeps && \
22+
tfenv --version && tgenv --version && tflint --version && az --version && tfswitch --version && \
2223
adduser -g "iac-executor" -D iac-executor
2324

2425
USER iac-executor

0 commit comments

Comments
 (0)