fix(docker): update GOPROXY setting and simplify go mod download command - #309
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 default GOPROXY to 'https://proxy.golang.org,direct' and refactors the Dockerfiles for both the notification manager and operator to simplify the build process. The feedback points out that adding 'ENV GOPROXY=${GOPROXY}' is redundant because the 'ARG' instruction already makes the variable available to subsequent build steps, so the 'ENV' instruction can be safely removed.
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 | ||
| ENV GOPROXY=${GOPROXY} |
There was a problem hiding this comment.
The ENV GOPROXY=${GOPROXY} instruction is redundant. In Docker, any ARG declared within a build stage (such as ARG GOPROXY on line 4) is automatically available as an environment variable to all subsequent RUN instructions in that stage. Since GOPROXY is only needed during the build phase (for go mod download and go build), we can safely remove the ENV instruction to keep the Dockerfile cleaner and avoid persisting the build-time proxy configuration in the builder stage's metadata.
ARG GOPROXY
| ARG GOPROXY | ||
| ENV GOPROXY=${GOPROXY} |
There was a problem hiding this comment.
The ENV GOPROXY=${GOPROXY} instruction is redundant. In Docker, any ARG declared within a build stage (such as ARG GOPROXY on line 4) is automatically available as an environment variable to all subsequent RUN instructions in that stage. Since GOPROXY is only needed during the build phase (for go mod download and go build), we can safely remove the ENV instruction to keep the Dockerfile cleaner and avoid persisting the build-time proxy configuration in the builder stage's metadata.
ARG GOPROXY
|
/cc @wanjunlei |