|
1 | 1 | #---------------------------------------------------------------------
|
2 | 2 | # STAGE 1: Build credential helpers inside a temporary container
|
3 | 3 | #---------------------------------------------------------------------
|
4 |
| -FROM --platform=linux/amd64 golang:1.23 as cred-helpers-build |
| 4 | +FROM --platform=linux/amd64 registry.access.redhat.com/ubi9/go-toolset:9.5 as cred-helpers-build |
5 | 5 |
|
6 |
| -RUN go install github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login@bef5bd9384b752e5c645659165746d5af23a098a |
7 |
| -RUN --mount=type=secret,id=gh_token,required=true \ |
| 6 | +RUN GOTOOLCHAIN=go1.23.4 go install github.com/awslabs/amazon-ecr-credential-helper/ecr-login/cli/docker-credential-ecr-login@bef5bd9384b752e5c645659165746d5af23a098a |
| 7 | +RUN --mount=type=secret,id=gh_token,uid=1001,required=true \ |
8 | 8 | git config --global url."https://$(cat /run/secrets/gh_token): [email protected]/snyk".insteadOf "https://github.com/snyk" && \
|
9 | 9 | go env -w GOPRIVATE=github.com/snyk && \
|
10 |
| - go install github.com/snyk/docker-credential-acr-env@8fa416c5b20b174e9032df1899843b4ebe2adda8 && \ |
| 10 | + GOTOOLCHAIN=go1.23.4 go install github.com/snyk/docker-credential-acr-env@8fa416c5b20b174e9032df1899843b4ebe2adda8 && \ |
11 | 11 | git config --global --unset url."https://$(cat /run/secrets/gh_token): [email protected]/snyk".insteadOf
|
12 | 12 |
|
13 | 13 | #---------------------------------------------------------------------
|
@@ -80,8 +80,8 @@ COPY --chown=snyk:snyk --from=containers-common /etc/containers/registries.d/def
|
80 | 80 | COPY --chown=snyk:snyk --from=containers-common /etc/containers/policy.json /etc/containers/policy.json
|
81 | 81 |
|
82 | 82 | # Install credential helpers
|
83 |
| -COPY --chown=snyk:snyk --from=cred-helpers-build /go/bin/docker-credential-ecr-login /usr/bin/docker-credential-ecr-login |
84 |
| -COPY --chown=snyk:snyk --from=cred-helpers-build /go/bin/docker-credential-acr-env /usr/local/bin/docker-credential-acr-env |
| 83 | +COPY --chown=snyk:snyk --from=cred-helpers-build /opt/app-root/src/go/bin/docker-credential-ecr-login /usr/bin/docker-credential-ecr-login |
| 84 | +COPY --chown=snyk:snyk --from=cred-helpers-build /opt/app-root/src/go/bin/docker-credential-acr-env /usr/bin/docker-credential-acr-env |
85 | 85 |
|
86 | 86 | # Install gcloud
|
87 | 87 | RUN curl -sSfL https://sdk.cloud.google.com | bash -s -- --disable-prompts --install-dir=/ && \
|
|
0 commit comments