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 95d2b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 37 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
1 change: 0 additions & 1 deletion builder-base/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ ANSIBLE_VERSION: 2.15.3
BUILDKIT_VERSION: v0.10.5
DOCKER_BUILDX_VERSION: v0.9.1
GITHUB_CLI_VERSION: 2.21.1
GOLANG_VERSION_116: 1.16.15-7
GOLANG_VERSION_117: 1.17.13-6
GOLANG_VERSION_118: 1.18.10-8
GOLANG_VERSION_119: 1.19.13-12
Expand Down

0 comments on commit 95d2b45

Please sign in to comment.