Skip to content

Commit

Permalink
Added golang 1.24 binary and licenses to image
Browse files Browse the repository at this point in the history
  • Loading branch information
srbgupta86 committed Feb 12, 2025
1 parent af6b367 commit 1e04888
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions builder-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,24 @@ RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_golang.sh $GOLANG_VERSION_123 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as golang-1.24
ARG TARGETARCH
ARG GOLANG_VERSION_124
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.24*.tar.gz /tmp/linux/arm64/
COPY $GOLANG_RPM_SOURCE_DIR/linux/amd64/go1.24*.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_124 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as skopeo
ARG TARGETARCH
ARG GOPROXY
Expand Down Expand Up @@ -554,6 +572,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.24
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.24 /golang-1.24 /
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 Expand Up @@ -609,6 +643,8 @@ COPY --link --from=go-licenses-1.22 /go-licenses-1.22 /
COPY --link --from=golang-1.23 /golang-1.23 /
COPY --link --from=go-licenses-1.23 /go-licenses-1.23 /
COPY --link --from=go-vuln-check /go-vuln-check /
COPY --link --from=golang-1.24 /golang-1.24 /
COPY --link --from=go-licenses-1.24 /go-licenses-1.24 /
# add the default golang verison last so its /usr/bin/go
# takes precendent
COPY --link --from=golang-1.20 /golang-1.20 /
Expand Down

0 comments on commit 1e04888

Please sign in to comment.