mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-13 05:02:50 +00:00
Ensure reproducible builds - support for SOURCE_DATE_EPOCH with dockerized builds
- Pass in SOURCE_DATE_EPOCH when we run the docker container - Looks like cleaning up symbol table also helps - Also trimming the path Tips from - https://blog.filippo.io/reproducing-go-binaries-byte-by-byte/ - https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/ Change-Id: Iedba85d9c1a36790fb8814795f7c27c1371cff1b
This commit is contained in:
@@ -600,6 +600,7 @@ function kube::build::run_build_command_ex() {
|
||||
--env "GOFLAGS=${GOFLAGS:-}"
|
||||
--env "GOLDFLAGS=${GOLDFLAGS:-}"
|
||||
--env "GOGCFLAGS=${GOGCFLAGS:-}"
|
||||
--env "SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-}"
|
||||
)
|
||||
|
||||
if [[ -n "${DOCKER_CGROUP_PARENT:-}" ]]; then
|
||||
|
Reference in New Issue
Block a user