Skip to content

Commit

Permalink
Add comment about TARGETARCH
Browse files Browse the repository at this point in the history
  • Loading branch information
dflook committed Mar 10, 2023
1 parent 071597c commit 0fa8755
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ RUN if [ "$FETCH_CHECKSUMS" = "yes" ]; then \
TERRAFORM_BIN_CHECKSUM_DIR="/var/terraform" get-terraform-checksums; \
fi

RUN echo "$TARGETARCH"

# TARGETARCH is set by the buildx command, which is used for the release image
# It will not be set when building locally, or when built by GitHub Actions
RUN if [ "$TARGETARCH" = "amd64" ]; then \
TERRAFORM_BIN_CACHE_DIR="/var/terraform" TERRAFORM_BIN_CHECKSUM_DIR="/var/terraform" terraform-version 0.9.0 \
&& TERRAFORM_BIN_CACHE_DIR="/var/terraform" TERRAFORM_BIN_CHECKSUM_DIR="/var/terraform" terraform-version 0.12.0; \
fi

RUN if [ "$TARGETARCH" = "arm64" ]; then \
TERRAFORM_BIN_CACHE_DIR="/var/terraform" TERRAFORM_BIN_CHECKSUM_DIR="/var/terraform" terraform-version 0.13.5; \
fi
Expand Down

0 comments on commit 0fa8755

Please sign in to comment.