From 1d7b91b5ea1f1b156cc027136f65ab5e6b4bf403 Mon Sep 17 00:00:00 2001 From: Jackson West Date: Mon, 30 Oct 2023 12:32:54 -0500 Subject: [PATCH] removes golang 1.16 and changes default version to 1.20 --- builder-base/Dockerfile | 41 +++++------------------------------------ 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/builder-base/Dockerfile b/builder-base/Dockerfile index 490e8b25f..5ade54cb2 100644 --- a/builder-base/Dockerfile +++ b/builder-base/Dockerfile @@ -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 @@ -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 @@ -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