-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.pkgsite
Milestone
Description
Problem
Currently, devtools/docker/Dockerfile.frontend uses the golang image as its base image.
This is inconsistent with modern best practices, where services are typically hosted on the minimal scratch image. The current image has an entire operating system and the Go toolchain included, which is unnecessary because only the frontend and its data are copied in. The frontend doesn’t need an entire OS to run.
Suggested solution
- Build cmd/frontend with
CGO_ENABLED=0to produce a statically linked binary. - Use
FROM scratchto build the final Docker image.
Links
Related: #39827
Metadata
Metadata
Assignees
Labels
NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.pkgsite