Skip to content

Commit

Permalink
use asdf based terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
moss2k13 committed Apr 18, 2024
1 parent 255a0f0 commit 19bb60d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FROM ghcr.io/runatlantis/atlantis:${ATLANTIS_VERSION} AS base
ARG ASDF_VERSION=v0.14.0
ARG K8S_VERSION=1.29.2
ARG HELM_VERSION=3.14.2
ARG TF_VERSION=1.5.7
ARG TG_VERSION=0.55.13
ARG TG_ATLANTIS_VERSION=1.17.4
ARG CONFTEST_VERSION=0.50.0
Expand Down Expand Up @@ -69,6 +70,7 @@ RUN bash -l -c " \
asdf plugin-add kubectl && \
asdf plugin-add helm && \
asdf plugin-add terragrunt && \
asdf plugin-add terraform && \
asdf plugin-add conftest && \
asdf plugin-add glab && \
asdf plugin-add gojq && \
Expand All @@ -81,6 +83,7 @@ RUN bash -l -c " \
cd /home/atlantis/ && \
asdf install kubectl ${K8S_VERSION} && \
asdf install helm ${HELM_VERSION} && \
asdf install terraform ${TF_VERSION} && \
asdf install terragrunt ${TG_VERSION} && \
asdf install conftest ${CONFTEST_VERSION} && \
asdf install glab ${GLAB_VERSION} && \
Expand All @@ -90,6 +93,7 @@ RUN bash -l -c " \
asdf install yq ${YQ_VERSION} && \
asdf global kubectl ${K8S_VERSION} && \
asdf global helm ${HELM_VERSION} && \
asdf global terraform ${TF_VERSION} && \
asdf global terragrunt ${TG_VERSION} && \
asdf global conftest ${CONFTEST_VERSION} && \
asdf global glab ${GLAB_VERSION} && \
Expand All @@ -99,8 +103,10 @@ RUN bash -l -c " \
asdf global yq ${YQ_VERSION}"

USER root
# Additional cleanup
RUN rm -rf /tmp/*
# Additional cleanup for non default terraform versions
RUN rm -f /usr/local/bin/terraform*.* && \
rm -rf /tmp/*

# Add 'alias' `jq` to `gojq`
RUN echo -e '#!/bin/bash \nexec gojq "$@"' > /usr/local/bin/jq && chmod +x /usr/local/bin/jq

Expand Down

0 comments on commit 19bb60d

Please sign in to comment.