Skip to content

Commit

Permalink
Merge pull request #12 from SOHAN-cyber/main
Browse files Browse the repository at this point in the history
Missing Tofu Binary in Docker Image
  • Loading branch information
kvendingoldo authored Sep 25, 2024
2 parents 1c56b20 + 14fc63e commit d167eb9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ ARG TOFU_VERSION=${TOFU_VERSION:-1.6.1}
RUN [ ${PRE_COMMIT_VERSION} = "latest" ] && pip3 install --no-cache-dir pre-commit \
|| pip3 install --no-cache-dir pre-commit==${PRE_COMMIT_VERSION}


RUN curl -LO https://github.com/opentofu/opentofu/releases/download/v${TOFU_VERSION}/tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip \
&& curl -LO https://github.com/opentofu/opentofu/releases/download/v${TOFU_VERSION}/tofu_${TOFU_VERSION}_SHA256SUMS \
&& [ $(sha256sum "tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip" | cut -f 1 -d ' ') = "$(grep "tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip" tofu_*_SHA256SUMS | cut -f 1 -d ' ')" ] \
&& unzip tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip \
&& mv tofu /usr/bin/tofu
&& unzip tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip -d /usr/bin/ \
&& rm "tofu_${TOFU_VERSION}_${TARGETOS}_${TARGETARCH}.zip" \
&& rm "tofu_${TOFU_VERSION}_SHA256SUMS"

#
# Install tools
Expand Down Expand Up @@ -208,6 +208,7 @@ COPY --from=builder \
/usr/local/bin/pre-commit \
# Hooks and terraform binaries
/bin_dir/ \
/usr/bin/tofu \
/usr/local/bin/checkov* \
/usr/bin/
# Copy pre-commit packages
Expand Down

0 comments on commit d167eb9

Please sign in to comment.