Skip to content

Commit

Permalink
removes golang 1.16 and changes default version to 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxesn committed Oct 30, 2023
1 parent adbda40 commit 1d7b91b
Showing 1 changed file with 5 additions and 36 deletions.
41 changes: 5 additions & 36 deletions builder-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -215,21 +215,6 @@ COPY ./scripts/install_base_yum_packages.sh ./scripts/remove_yum_packages.sh ./s
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_ansible.sh

FROM ${BUILDER_IMAGE} as golang-1.16
ARG TARGETARCH
ARG GOLANG_VERSION_116
ARG GOLANG_RPM_SOURCE_DIR
WORKDIR /workdir
ENV GOPATH /go
ENV PATH="/go/bin/:$PATH"
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/x86_64/golang*1.16*.rpm /tmp/x86_64/
COPY $GOLANG_RPM_SOURCE_DIR/aarch64/golang*1.16*.rpm /tmp/aarch64/
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked \
/install_base_yum_packages.sh && \
/install_golang.sh $GOLANG_VERSION_116 && \
/remove_yum_packages.sh

FROM ${BUILDER_IMAGE} as golang-1.17
ARG TARGETARCH
Expand Down Expand Up @@ -346,21 +331,6 @@ RUN --mount=type=cache,target=/root/.cache/go-build,sharing=locked \
--mount=type=secret,id=netrc,target=/root/.netrc \
/install_linuxkit.sh

FROM ${BUILDER_IMAGE} as go-licenses-1.16
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=golang-1.16 /golang-1.16 /
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-licenses-1.17
ARG TARGETARCH
ARG GOPROXY
Expand Down Expand Up @@ -473,22 +443,21 @@ COPY --link --from=goss /goss /
COPY --link --from=packer /packer /
COPY --link --from=ansible /ansible /
COPY --link --from=nodejs /nodejs /
COPY --link --from=golang-1.16 /golang-1.16 /
COPY --link --from=linuxkit /linuxkit /
COPY --link --from=golang-1.17 /golang-1.17 /
COPY --link --from=go-licenses-1.17 /go-licenses-1.17 /
COPY --link --from=golang-1.18 /golang-1.18 /
COPY --link --from=go-licenses-1.18 /go-licenses-1.18 /
COPY --link --from=golang-1.19 /golang-1.19 /
COPY --link --from=go-licenses-1.19 /go-licenses-1.19 /
COPY --link --from=golang-1.20 /golang-1.20 /
COPY --link --from=go-licenses-1.20 /go-licenses-1.20 /
COPY --link --from=golang-1.21 /golang-1.21 /
COPY --link --from=go-licenses-1.21 /go-licenses-1.21 /
COPY --link --from=go-vuln-check /go-vuln-check /
# add the default golang verison last so its /usr/bin/go
# takes precendent
COPY --link --from=golang-1.18 /golang-1.18 /
COPY --link --from=go-licenses-1.18 /go-licenses-1.18 /
COPY --link --from=go-licenses-1.16 /go-licenses-1.16 /
COPY --link --from=golang-1.20 /golang-1.20 /
COPY --link --from=go-licenses-1.20 /go-licenses-1.20 /


FROM ${FINAL_STAGE_BASE} as final

Expand Down

0 comments on commit 1d7b91b

Please sign in to comment.