Skip to content

Commit 7085ea4

Browse files
Merge pull request #2711 from Nordix/devel/defaults
🌱 Dockerfile: strip out symbol table by default for public images
2 parents 6f75021 + 4164250 commit 7085ea4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY apis/go.mod apis/go.sum apis/
1414
COPY hack/tools/go.mod hack/tools/go.sum hack/tools/
1515
COPY pkg/hardwareutils/go.mod pkg/hardwareutils/go.sum pkg/hardwareutils/
1616
RUN go mod download
17-
ARG LDFLAGS=-extldflags=-static
17+
ARG LDFLAGS=-s -w -extldflags=-static
1818

1919
COPY . .
2020
RUN CGO_ENABLED=0 GO111MODULE=on go build -a -ldflags "${LDFLAGS}" -o baremetal-operator main.go

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ generate: $(CONTROLLER_GEN) ## Generate code
263263
docker: generate manifests ## Build the docker image
264264
docker build . -t ${IMG} \
265265
--build-arg http_proxy=$(http_proxy) \
266-
--build-arg https_proxy=$(https_proxy) \
267-
--build-arg LDFLAGS="-s -w -extldflags=-static"
266+
--build-arg https_proxy=$(https_proxy)
268267

269268
.PHONY: docker-debug
270269
docker-debug: generate manifests ## Build the docker image with debug info

0 commit comments

Comments
 (0)