ndimiduk commented on code in PR #309: URL: https://github.com/apache/yetus/pull/309#discussion_r1318344417
########## precommit/src/main/shell/test-patch-docker/Dockerfile: ########## @@ -145,14 +145,22 @@ RUN curl -sSL \ #### # Install hadolint (dockerfile lint) #### -FROM yetusbase AS yetushadolint +FROM yetusbase as yetushadolint_arm64 ARG HADOLINT_VERSION=2.12.0 SHELL ["/bin/bash", "-o", "pipefail", "-c"] -RUN if [[ "$(uname -m)" == "x86_64" ]]; then curl -sSL \ - https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-Linux-"$(uname -m)" \ +RUN curl -sSl \ Review Comment: Docker's runtime prunes the execution graph such that the download only happens for the architecture target that is being built. If you're building a multi-articture image, both binaries are downloaded and both are used by independent copies of the subsequent step. That step is only defined once (keeping things DRY) and the downloaded binaries are both cached, which eases developer pain. I agree that it adds to layer accumulation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@yetus.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org