Skip to content

Commit

Permalink
Build correct docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
tim775 authored Jun 7, 2024
1 parent 94e6bfc commit 6307950
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ ARG cli_version=v0.10

# Install required packages and latest ${cli_version} version of Infracost
RUN apk --update --no-cache add ca-certificates openssl openssh-client curl git jq

# Download and install the correct Infracost binary based on the target architecture
ARG TARGETARCH
RUN \
curl -s -L "https://infracost.io/downloads/$cli_version/infracost-linux-amd64.tar.gz" | tar xz -C /tmp && \
mv /tmp/infracost-linux-amd64 /usr/bin/infracost
curl -s -L "https://infracost.io/downloads/$cli_version/infracost-linux-${TARGETARCH}.tar.gz" | tar xz -C /tmp && \
mv /tmp/infracost-linux-${TARGETARCH} /usr/bin/infracost

### Legacy logic - not needed for new users
# The following logic is to support older infracost-atlantis users that used the atlantis_diff.sh script and compost.
Expand Down

0 comments on commit 6307950

Please sign in to comment.