fix(docker): update GOPROXY setting and simplify go mod download command - #308
Conversation
Gentleelephant
commented
Jun 22, 2026
- 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>
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
| ARG GOPROXY="https://proxy.golang.org,direct" | ||
| # Build the manager binary | ||
| FROM golang:1.20 as builder | ||
| FROM golang:1.20 AS builder |
There was a problem hiding this comment.
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
|
/cc @wanjunlei |