Skip to content

Commit

Permalink
feat: upgrade go 1.17 to 1.18 (#1255)
Browse files Browse the repository at this point in the history
Signed-off-by: fengshunli <[email protected]>
  • Loading branch information
fengshunli authored Feb 22, 2023
1 parent c3a80ba commit d4f1f3a
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.node-servant
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurt-node-servant

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.yurt-controller-manager
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurt-controller-manager

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.yurt-manager
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurt-controller-manager

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.yurt-tunnel-agent
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurt-tunnel-agent

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.yurt-tunnel-server
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurt-tunnel-server

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables conntrack-tools && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/dockerfiles/build/Dockerfile.yurthub
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# multi-arch image building for yurthub

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.node-servant
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurt-node-servant

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-node-servant

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.yurt-controller-manager
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurt-controller-manager

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-controller-manager

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.yurt-manager
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurt-tunnel-server

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-manager

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables conntrack-tools curl && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.yurt-tunnel-agent
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurt-tunnel-agent

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-tunnel-agent

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.yurt-tunnel-server
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurt-tunnel-server

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurt-tunnel-server

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables conntrack-tools && update-ca-certificates && rm /var/cache/apk/*
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/release/Dockerfile.yurthub
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# multi-arch image building for yurthub

FROM --platform=${BUILDPLATFORM} golang:1.17.1 as builder
FROM --platform=${BUILDPLATFORM} golang:1.18 as builder
ADD . /build
ARG TARGETOS TARGETARCH GIT_VERSION GOPROXY MIRROR_REPO
WORKDIR /build/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GIT_VERSION=${GIT_VERSION} make build WHAT=cmd/yurthub

FROM --platform=${TARGETPLATFORM} alpine:3.14
FROM --platform=${TARGETPLATFORM} alpine:3.17
ARG TARGETOS TARGETARCH MIRROR_REPO
RUN if [ ! -z "${MIRROR_REPO+x}" ]; then sed -i "s/dl-cdn.alpinelinux.org/${MIRROR_REPO}/g" /etc/apk/repositories; fi && \
apk add ca-certificates bash libc6-compat iptables ip6tables && update-ca-certificates && rm /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion hack/make-rules/image_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ REGION=${REGION:-}
IMAGE_REPO=${IMAGE_REPO:-"openyurt"}
IMAGE_TAG=${IMAGE_TAG:-$(get_image_tag)}
DOCKER_BUILD_ARGS=""
BUILD_BASE_IMAGE="golang:1.17.1"
BUILD_BASE_IMAGE="golang:1.18"
BUILD_GOPROXY=$(go env GOPROXY)
GOPROXY_CN="https://goproxy.cn"
APKREPO_MIRROR_CN="mirrors.aliyun.com"
Expand Down

0 comments on commit d4f1f3a

Please sign in to comment.