Skip to content

fix(docker): update GOPROXY setting and simplify go mod download command - #308

Merged
wanjunlei merged 1 commit into
kubesphere:release-2.7from
Gentleelephant:release-2.7-update-ci
Jun 22, 2026
Merged

fix(docker): update GOPROXY setting and simplify go mod download command#308
wanjunlei merged 1 commit into
kubesphere:release-2.7from
Gentleelephant:release-2.7-update-ci

Conversation

@Gentleelephant

Copy link
Copy Markdown
Collaborator
  • Change GOPROXY argument value to "https://proxy.golang.org,direct"
  • Set GOPROXY as environment variable inside Dockerfiles
  • Remove explicit GOPROXY usage in "go mod download" commands
  • Use capital AS for Docker build stage aliases
  • Simplify build command by removing GOPROXY prefix in operator DockerfileRUN command

- Change GOPROXY argument value to "https://proxy.golang.org,direct"
- Set GOPROXY as environment variable inside Dockerfiles
- Remove explicit GOPROXY usage in "go mod download" commands
- Use capital AS for Docker build stage aliases
- Simplify build command by removing GOPROXY prefix in operator DockerfileRUN command

Signed-off-by: Gentleelephant <1132960613@qq.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Dockerfiles for both the notification-manager and operator to use the default Go proxy (https://proxy.golang.org,direct) and sets the GOPROXY environment variable globally in the builder stage. The reviewer recommends upgrading the builder image from the EOL Go 1.20 to a supported version like Go 1.22 to ensure security and performance benefits.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

ARG GOPROXY="https://proxy.golang.org,direct"
# Build the manager binary
FROM golang:1.20 as builder
FROM golang:1.20 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The Go 1.20 release is End-of-Life (EOL) and no longer receives security patches or bug fixes. It is highly recommended to upgrade the builder image to a supported Go version (such as Go 1.22) to ensure the build environment is secure and benefits from recent compiler optimizations and security updates.

FROM golang:1.22 AS builder

Comment thread cmd/operator/Dockerfile
ARG GOPROXY="https://proxy.golang.org,direct"
# Build the manager binary
FROM golang:1.20 as builder
FROM golang:1.20 AS builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-medium medium

The Go 1.20 release is End-of-Life (EOL) and no longer receives security patches or bug fixes. It is highly recommended to upgrade the builder image to a supported Go version (such as Go 1.22) to ensure the build environment is secure and benefits from recent compiler optimizations and security updates.

FROM golang:1.22 AS builder

@Gentleelephant

Copy link
Copy Markdown
Collaborator Author

/cc @wanjunlei

@wanjunlei
wanjunlei merged commit abfa84f into kubesphere:release-2.7 Jun 22, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants