Skip to content

Commit d6fe24e

Browse files
hittytPangjiping
authored andcommitted
build: make native Go builds repeatable
1 parent 728e8f0 commit d6fe24e

13 files changed

Lines changed: 226 additions & 24 deletions

File tree

CONTRIBUTING.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,49 @@ dotnet build OpenSandbox.CodeInterpreter.sln --configuration Release /warnaserro
376376
- **Error Messages**: Provide actionable error messages with context
377377
- **Logging**: Use appropriate log levels (DEBUG, INFO, WARNING, ERROR)
378378

379+
## Build System Standards
380+
381+
OpenSandbox produces native Go binaries for `components/execd`, `components/ingress`,
382+
`components/egress`, `kubernetes`, and `sdks/sandbox/go`. These build systems must
383+
preserve caller-provided build flags and only append project-required flags.
384+
385+
### Build Variables
386+
387+
- Go builds pass caller-provided `GOFLAGS` to `go build` and append project flags such as `-trimpath` and `-buildvcs=false`.
388+
- Go linker builds pass caller-provided `LDFLAGS` to `go build -ldflags` and append project metadata flags.
389+
- When CGO is enabled, the Go toolchain honors `CC`, `CXX`, `CGO_CFLAGS`, `CGO_CXXFLAGS`, and `CGO_LDFLAGS`. Docker-based builds also accept `CFLAGS` and `CXXFLAGS` as fallbacks for `CGO_CFLAGS` and `CGO_CXXFLAGS`.
390+
- Docker build scripts forward these variables as build arguments when they are present in the environment.
391+
392+
### Debug Information
393+
394+
Default project builds must not strip debug information. Do not add `strip`,
395+
`install -s`, or Go linker flags such as `-s -w` to the default build path.
396+
Distribution-specific packaging may strip binaries only outside the default
397+
developer and CI build path.
398+
399+
### Build Dependency Graph
400+
401+
Use package-aware build tools instead of recursive independent builds:
402+
403+
- Go packages are built through `go build ./...` or explicit Go package entry points.
404+
- Kotlin projects use Gradle task dependencies.
405+
- JavaScript and TypeScript SDKs use pnpm workspace dependencies.
406+
- C# SDKs use solution/project references through `dotnet build`.
407+
408+
Subdirectory-specific Make targets may delegate to these tools, but they must not
409+
replace the build tool's dependency graph with independent recursive directory
410+
builds where cross-directory dependencies exist.
411+
412+
### Repeatable Builds
413+
414+
Native Go binary builds include `-trimpath`, `-buildvcs=false`, and `-ldflags`
415+
with `-buildid= -B none` so that source paths, VCS metadata, and build IDs or
416+
Mach-O UUIDs do not make binaries differ. For repeatable release metadata, set `SOURCE_DATE_EPOCH`
417+
or set `BUILD_TIME`, `VERSION`, and `GIT_COMMIT` explicitly before invoking
418+
Makefile or Docker build scripts. When `SOURCE_DATE_EPOCH` is set and
419+
`BUILD_TIME` is unset, build scripts derive `BUILD_TIME` from
420+
`SOURCE_DATE_EPOCH`.
421+
379422
## Testing Guidelines
380423

381424
### Test Coverage Requirements

components/egress/Dockerfile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ WORKDIR /workspace
1919
ARG VERSION=dev
2020
ARG GIT_COMMIT=unknown
2121
ARG BUILD_TIME=unknown
22+
ARG GOFLAGS=
23+
ARG LDFLAGS=
24+
ARG CGO_ENABLED=0
25+
ARG CC=
26+
ARG CXX=
27+
ARG CFLAGS=
28+
ARG CXXFLAGS=
29+
ARG CGO_CFLAGS=
30+
ARG CGO_CXXFLAGS=
31+
ARG CGO_LDFLAGS=
2232

2333
# Copy only go mod/sum first for better caching
2434
COPY components/egress/go.mod components/egress/go.sum ./components/egress/
@@ -27,14 +37,20 @@ COPY components/internal ./components/internal
2737

2838
WORKDIR /workspace/components/egress
2939

30-
# Static-ish build (no cgo) to simplify runtime deps
31-
ENV CGO_ENABLED=0
40+
# Static-ish build (no cgo by default) to simplify runtime deps.
3241
RUN go mod download
3342

3443
# Copy the rest of the egress sources
3544
COPY components/egress ./
36-
RUN CGO_ENABLED=0 go build \
37-
-ldflags "-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
45+
RUN if [ -n "${CC}" ]; then export CC; fi; \
46+
if [ -n "${CXX}" ]; then export CXX; fi; \
47+
export CGO_ENABLED="${CGO_ENABLED}" \
48+
CGO_CFLAGS="${CGO_CFLAGS:-${CFLAGS}}" \
49+
CGO_CXXFLAGS="${CGO_CXXFLAGS:-${CXXFLAGS}}" \
50+
CGO_LDFLAGS="${CGO_LDFLAGS}"; \
51+
go build ${GOFLAGS} -trimpath -buildvcs=false \
52+
-ldflags "${LDFLAGS} -buildid= -B none \
53+
-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
3854
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=${BUILD_TIME}' \
3955
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=${GIT_COMMIT}'" \
4056
-o /out/egress .

components/egress/build.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,30 @@
1515

1616
set -ex
1717

18+
default_build_time() {
19+
if [[ -n "${SOURCE_DATE_EPOCH:-}" ]]; then
20+
date -u -d "@${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null ||
21+
date -u -r "${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ"
22+
else
23+
date -u +"%Y-%m-%dT%H:%M:%SZ"
24+
fi
25+
}
26+
27+
build_arg_if_set() {
28+
local name="$1"
29+
if [[ -n "${!name+x}" ]]; then
30+
BUILD_ARGS+=(--build-arg "${name}=${!name}")
31+
fi
32+
}
33+
1834
TAG=${TAG:-latest}
1935
VERSION=${VERSION:-$(git describe --tags --always --dirty 2>/dev/null || echo "dev")}
2036
GIT_COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD 2>/dev/null || echo "unknown")}
21-
BUILD_TIME=${BUILD_TIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
37+
BUILD_TIME=${BUILD_TIME:-$(default_build_time)}
38+
BUILD_ARGS=()
39+
for name in GOFLAGS LDFLAGS CGO_ENABLED CC CXX CFLAGS CXXFLAGS CGO_CFLAGS CGO_CXXFLAGS CGO_LDFLAGS; do
40+
build_arg_if_set "${name}"
41+
done
2242
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$0")/../..")
2343
cd "${REPO_ROOT}"
2444

@@ -37,6 +57,7 @@ docker buildx build \
3757
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/egress:${TAG} \
3858
"${LATEST_TAGS[@]}" \
3959
-f components/egress/Dockerfile \
60+
"${BUILD_ARGS[@]}" \
4061
--build-arg VERSION="${VERSION}" \
4162
--build-arg GIT_COMMIT="${GIT_COMMIT}" \
4263
--build-arg BUILD_TIME="${BUILD_TIME}" \

components/execd/Dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ WORKDIR /build
1919
ARG VERSION=dev
2020
ARG GIT_COMMIT=unknown
2121
ARG BUILD_TIME=unknown
22+
ARG GOFLAGS=
23+
ARG LDFLAGS=
24+
ARG CGO_ENABLED=0
25+
ARG CC=
26+
ARG CXX=
27+
ARG CFLAGS=
28+
ARG CXXFLAGS=
29+
ARG CGO_CFLAGS=
30+
ARG CGO_CXXFLAGS=
31+
ARG CGO_LDFLAGS=
2232

2333
# Prepare local modules to satisfy replace directives.
2434
COPY components/internal/go.mod components/internal/go.sum ./components/internal/
@@ -34,14 +44,22 @@ COPY components/execd ./components/execd
3444

3545
WORKDIR /build/components/execd
3646

37-
RUN CGO_ENABLED=0 go build \
38-
-ldflags "-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
47+
RUN if [ -n "${CC}" ]; then export CC; fi; \
48+
if [ -n "${CXX}" ]; then export CXX; fi; \
49+
export CGO_ENABLED="${CGO_ENABLED}" \
50+
CGO_CFLAGS="${CGO_CFLAGS:-${CFLAGS}}" \
51+
CGO_CXXFLAGS="${CGO_CXXFLAGS:-${CXXFLAGS}}" \
52+
CGO_LDFLAGS="${CGO_LDFLAGS}"; \
53+
go build ${GOFLAGS} -trimpath -buildvcs=false \
54+
-ldflags "${LDFLAGS} -buildid= -B none \
55+
-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
3956
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=${BUILD_TIME}' \
4057
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=${GIT_COMMIT}'" \
4158
-o /build/execd ./main.go
4259

43-
RUN CGO_ENABLED=0 GOOS=windows go build \
44-
-ldflags "-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
60+
RUN CGO_ENABLED=0 GOOS=windows go build ${GOFLAGS} -trimpath -buildvcs=false \
61+
-ldflags "${LDFLAGS} -buildid= -B none \
62+
-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
4563
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=${BUILD_TIME}' \
4664
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=${GIT_COMMIT}'" \
4765
-o /build/execd.exe ./main.go

components/execd/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ golint: fmt install-golint
2828

2929
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || git rev-parse --short HEAD 2>/dev/null || echo "dev")
3030
GIT_COMMIT ?= $(shell git rev-parse HEAD 2>/dev/null || echo "unknown")
31-
BUILD_TIME ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
32-
LDFLAGS := -X 'github.com/alibaba/opensandbox/internal/version.Version=$(VERSION)' \
31+
BUILD_TIME ?= $(shell if [ -n "$$SOURCE_DATE_EPOCH" ]; then date -u -d "@$$SOURCE_DATE_EPOCH" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null; else date -u +"%Y-%m-%dT%H:%M:%SZ"; fi)
32+
PROJECT_GOFLAGS := -trimpath -buildvcs=false
33+
PROJECT_LDFLAGS := -buildid= -B none -X 'github.com/alibaba/opensandbox/internal/version.Version=$(VERSION)' \
3334
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=$(BUILD_TIME)' \
3435
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=$(GIT_COMMIT)'
36+
GO_BUILD_FLAGS := $(strip $(GOFLAGS) $(PROJECT_GOFLAGS))
37+
GO_LDFLAGS := $(strip $(LDFLAGS) $(PROJECT_LDFLAGS))
3538

3639
.PHONY: build
3740
build: vet ## Build the binary.
3841
@mkdir -p bin
39-
go build -ldflags "$(LDFLAGS)" -o bin/execd main.go
42+
go build $(GO_BUILD_FLAGS) -ldflags "$(GO_LDFLAGS)" -o bin/execd main.go
4043

4144
.PHONY: multi-build
4245
multi-build: vet ## Cross-compile for linux/windows/darwin amd64/arm64.
@@ -46,6 +49,6 @@ multi-build: vet ## Cross-compile for linux/windows/darwin amd64/arm64.
4649
out=bin/execd_$(VERSION)_$${os}_$${arch}; \
4750
[ "$${os}" = "windows" ] && out="$${out}.exe"; \
4851
echo ">> building $${os}/$${arch} -> $${out}"; \
49-
GOOS=$${os} GOARCH=$${arch} CGO_ENABLED=0 go build -ldflags "$(LDFLAGS)" -o "$${out}" main.go || exit $$?; \
52+
GOOS=$${os} GOARCH=$${arch} CGO_ENABLED=0 go build $(GO_BUILD_FLAGS) -ldflags "$(GO_LDFLAGS)" -o "$${out}" main.go || exit $$?; \
5053
done; \
5154
done

components/execd/build.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,30 @@
1515

1616
set -ex
1717

18+
default_build_time() {
19+
if [[ -n "${SOURCE_DATE_EPOCH:-}" ]]; then
20+
date -u -d "@${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null ||
21+
date -u -r "${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ"
22+
else
23+
date -u +"%Y-%m-%dT%H:%M:%SZ"
24+
fi
25+
}
26+
27+
build_arg_if_set() {
28+
local name="$1"
29+
if [[ -n "${!name+x}" ]]; then
30+
BUILD_ARGS+=(--build-arg "${name}=${!name}")
31+
fi
32+
}
33+
1834
TAG=${TAG:-latest}
1935
VERSION=${VERSION:-$(git describe --tags --always --dirty 2>/dev/null || echo "dev")}
2036
GIT_COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD 2>/dev/null || echo "unknown")}
21-
BUILD_TIME=${BUILD_TIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
37+
BUILD_TIME=${BUILD_TIME:-$(default_build_time)}
38+
BUILD_ARGS=()
39+
for name in GOFLAGS LDFLAGS CGO_ENABLED CC CXX CFLAGS CXXFLAGS CGO_CFLAGS CGO_CXXFLAGS CGO_LDFLAGS; do
40+
build_arg_if_set "${name}"
41+
done
2242

2343
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$0")/../..")
2444
cd "${REPO_ROOT}"
@@ -41,6 +61,7 @@ docker buildx build \
4161
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/execd:${TAG} \
4262
"${LATEST_TAGS[@]}" \
4363
-f components/execd/Dockerfile \
64+
"${BUILD_ARGS[@]}" \
4465
--build-arg VERSION="${VERSION}" \
4566
--build-arg GIT_COMMIT="${GIT_COMMIT}" \
4667
--build-arg BUILD_TIME="${BUILD_TIME}" \

components/ingress/Dockerfile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ WORKDIR /build
1919
ARG VERSION=dev
2020
ARG GIT_COMMIT=unknown
2121
ARG BUILD_TIME=unknown
22+
ARG GOFLAGS=
23+
ARG LDFLAGS=
24+
ARG CGO_ENABLED=0
25+
ARG CC=
26+
ARG CXX=
27+
ARG CFLAGS=
28+
ARG CXXFLAGS=
29+
ARG CGO_CFLAGS=
30+
ARG CGO_CXXFLAGS=
31+
ARG CGO_LDFLAGS=
2232

2333
COPY kubernetes ./kubernetes
2434
# Prepare local modules to satisfy replace directives.
@@ -36,8 +46,15 @@ COPY components/ingress/. ./components/ingress
3646

3747
WORKDIR /build/components/ingress
3848

39-
RUN CGO_ENABLED=0 go build \
40-
-ldflags "-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
49+
RUN if [ -n "${CC}" ]; then export CC; fi; \
50+
if [ -n "${CXX}" ]; then export CXX; fi; \
51+
export CGO_ENABLED="${CGO_ENABLED}" \
52+
CGO_CFLAGS="${CGO_CFLAGS:-${CFLAGS}}" \
53+
CGO_CXXFLAGS="${CGO_CXXFLAGS:-${CXXFLAGS}}" \
54+
CGO_LDFLAGS="${CGO_LDFLAGS}"; \
55+
go build ${GOFLAGS} -trimpath -buildvcs=false \
56+
-ldflags "${LDFLAGS} -buildid= -B none \
57+
-X 'github.com/alibaba/opensandbox/internal/version.Version=${VERSION}' \
4158
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=${BUILD_TIME}' \
4259
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=${GIT_COMMIT}'" \
4360
-o /build/ingress ./main.go

components/ingress/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,18 @@ golint: fmt install-golint
2828

2929
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
3030
GIT_COMMIT ?= $(shell git rev-parse HEAD 2>/dev/null || echo "unknown")
31-
BUILD_TIME ?= $(shell date -u +"%Y-%m-%dT%H:%M:%SZ")
32-
LDFLAGS := -X 'github.com/alibaba/opensandbox/internal/version.Version=$(VERSION)' \
31+
BUILD_TIME ?= $(shell if [ -n "$$SOURCE_DATE_EPOCH" ]; then date -u -d "@$$SOURCE_DATE_EPOCH" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null; else date -u +"%Y-%m-%dT%H:%M:%SZ"; fi)
32+
PROJECT_GOFLAGS := -trimpath -buildvcs=false
33+
PROJECT_LDFLAGS := -buildid= -B none -X 'github.com/alibaba/opensandbox/internal/version.Version=$(VERSION)' \
3334
-X 'github.com/alibaba/opensandbox/internal/version.BuildTime=$(BUILD_TIME)' \
3435
-X 'github.com/alibaba/opensandbox/internal/version.GitCommit=$(GIT_COMMIT)'
36+
GO_BUILD_FLAGS := $(strip $(GOFLAGS) $(PROJECT_GOFLAGS))
37+
GO_LDFLAGS := $(strip $(LDFLAGS) $(PROJECT_LDFLAGS))
3538

3639
.PHONY: build
3740
build: vet ## Build the binary.
3841
@mkdir -p bin
39-
go build -ldflags "$(LDFLAGS)" -o bin/router main.go
42+
go build $(GO_BUILD_FLAGS) -ldflags "$(GO_LDFLAGS)" -o bin/router main.go
4043

4144
.PHONY: clean
4245
clean: ## Clean build artifacts.

components/ingress/build.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,30 @@
1515

1616
set -ex
1717

18+
default_build_time() {
19+
if [[ -n "${SOURCE_DATE_EPOCH:-}" ]]; then
20+
date -u -d "@${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null ||
21+
date -u -r "${SOURCE_DATE_EPOCH}" +"%Y-%m-%dT%H:%M:%SZ"
22+
else
23+
date -u +"%Y-%m-%dT%H:%M:%SZ"
24+
fi
25+
}
26+
27+
build_arg_if_set() {
28+
local name="$1"
29+
if [[ -n "${!name+x}" ]]; then
30+
BUILD_ARGS+=(--build-arg "${name}=${!name}")
31+
fi
32+
}
33+
1834
TAG=${TAG:-latest}
1935
VERSION=${VERSION:-$(git describe --tags --always --dirty 2>/dev/null || echo "dev")}
2036
GIT_COMMIT=${GIT_COMMIT:-$(git rev-parse HEAD 2>/dev/null || echo "unknown")}
21-
BUILD_TIME=${BUILD_TIME:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")}
37+
BUILD_TIME=${BUILD_TIME:-$(default_build_time)}
38+
BUILD_ARGS=()
39+
for name in GOFLAGS LDFLAGS CGO_ENABLED CC CXX CFLAGS CXXFLAGS CGO_CFLAGS CGO_CXXFLAGS CGO_LDFLAGS; do
40+
build_arg_if_set "${name}"
41+
done
2242

2343
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$0")/../..")
2444
cd "${REPO_ROOT}"
@@ -41,6 +61,7 @@ docker buildx build \
4161
-t sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com/opensandbox/ingress:${TAG} \
4262
"${LATEST_TAGS[@]}" \
4363
-f components/ingress/Dockerfile \
64+
"${BUILD_ARGS[@]}" \
4465
--build-arg VERSION="${VERSION}" \
4566
--build-arg GIT_COMMIT="${GIT_COMMIT}" \
4667
--build-arg BUILD_TIME="${BUILD_TIME}" \

kubernetes/Dockerfile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
FROM golang:1.24 AS builder
1717
ARG TARGETOS
1818
ARG TARGETARCH
19+
ARG GOFLAGS=
20+
ARG LDFLAGS=
21+
ARG CGO_ENABLED=0
22+
ARG CC=
23+
ARG CXX=
24+
ARG CFLAGS=
25+
ARG CXXFLAGS=
26+
ARG CGO_CFLAGS=
27+
ARG CGO_CXXFLAGS=
28+
ARG CGO_LDFLAGS=
1929

2030
WORKDIR /workspace
2131
# Copy the Go Modules manifests
@@ -38,7 +48,15 @@ COPY internal/ internal/
3848
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
3949
RUN echo "Building for $TARGETOS/$TARGETARCH"
4050
ARG PACKAGE=./cmd/controller
41-
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -o server ${PACKAGE}
51+
RUN if [ -n "${CC}" ]; then export CC; fi; \
52+
if [ -n "${CXX}" ]; then export CXX; fi; \
53+
export CGO_ENABLED="${CGO_ENABLED}" GOOS="${TARGETOS:-linux}" GOARCH="${TARGETARCH}" \
54+
CGO_CFLAGS="${CGO_CFLAGS:-${CFLAGS}}" \
55+
CGO_CXXFLAGS="${CGO_CXXFLAGS:-${CXXFLAGS}}" \
56+
CGO_LDFLAGS="${CGO_LDFLAGS}"; \
57+
go build ${GOFLAGS} -trimpath -buildvcs=false \
58+
-ldflags "${LDFLAGS} -buildid= -B none" \
59+
-o server ${PACKAGE}
4260

4361
# Use golang image as base to ensure nsenter (util-linux) is available
4462
# distroless does not contain shell or nsenter

0 commit comments

Comments
 (0)