File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -276,11 +276,10 @@ libexec/%.o: elf/%.c
276276 $(Q )$(CLANG ) -nostdinc -D __KERNEL__ $(KERNEL_INCLUDES ) -O2 -Wall -target bpf -c $< -o $@
277277
278278bin/% : .static.% .$(STATIC )
279- $(Q ) bin=$(notdir $@ ) ; src=cmd/$$ bin; \
279+ $(Q ) bin=$(notdir $@ ) ; src=./ cmd/$$ bin; \
280280 echo " Building $$ ([ -n " $(STATIC ) " ] && echo 'static ')$@ (version $( BUILD_VERSION) , build $( BUILD_BUILDID) )..." ; \
281281 mkdir -p bin && \
282- cd $$ src && \
283- $(GO_BUILD ) $(BUILD_TAGS ) $(LDFLAGS ) $(GCFLAGS ) -o ../../bin/$$ bin
282+ $(GO_BUILD ) $(BUILD_TAGS ) $(LDFLAGS ) $(GCFLAGS ) -o bin/ $$ src
284283
285284.static.% .$(STATIC ) :
286285 $(Q ) if [ ! -f " $@ " ]; then \
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN go mod download
1212# Build webhook, fully statically linked binary
1313COPY . .
1414
15- RUN CGO_ENABLED=0 make BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe"
15+ RUN CGO_ENABLED=0 make build-static BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe"
1616
1717FROM scratch as final
1818
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN go mod download
1212# Build webhook, fully statically linked binary
1313COPY . .
1414
15- RUN CGO_ENABLED=0 make BUILD_DIRS=cri-resmgr-webhook
15+ RUN CGO_ENABLED=0 make build-static BUILD_DIRS=cri-resmgr-webhook
1616
1717FROM scratch as final
1818
You can’t perform that action at this time.
0 commit comments