Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add go 1.23 image and license image to builder-base Dockerfile #1502

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions builder-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,24 @@ RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_golang.sh $GOLANG_VERSION_122 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as golang-1.23
ARG TARGETARCH
ARG GOLANG_VERSION_123
ARG GOLANG_RPM_SOURCE_DIR
WORKDIR /workdir
ENV GOPATH /go
ENV PATH="/go/bin/:$PATH"

COPY --link --from=upx /upx /
COPY ./scripts/install_base_yum_packages.sh ./scripts/remove_yum_packages.sh ./scripts/common_vars.sh \
./scripts/install_golang.sh /
COPY $GOLANG_RPM_SOURCE_DIR/linux/arm64/go1.23*.tar.gz /tmp/linux/arm64/
COPY $GOLANG_RPM_SOURCE_DIR/linux/amd64/go1.23*.tar.gz /tmp/linux/amd64/
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_base_yum_packages.sh && \
/install_golang.sh $GOLANG_VERSION_123 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as skopeo
ARG TARGETARCH
ARG GOPROXY
Expand Down Expand Up @@ -520,6 +538,22 @@ RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=secret,id=netrc,target=/root/.netrc \
/install_go_licenses.sh

FROM ${BUILDER_IMAGE} as go-licenses-1.23
ARG TARGETARCH
ARG GOPROXY
ARG GO_LICENSES_VERSION
ENV GO_LICENSES_VERSION=$GO_LICENSES_VERSION
WORKDIR /workdir
ENV GOPATH /go
ENV PATH="/go/bin/:$PATH"
COPY --link --from=upx /upx /
COPY --link --from=golang-1.23 /golang-1.23 /
COPY ./scripts/common_vars.sh \
./scripts/install_go_licenses.sh /
RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=secret,id=netrc,target=/root/.netrc \
/install_go_licenses.sh

FROM ${BUILDER_IMAGE} as go-vuln-check
ARG TARGETARCH
ARG GOPROXY
Expand Down
Loading