Skip to content

Commit

Permalink
images: build statically linked binaries
Browse files Browse the repository at this point in the history
We use scratch as the base image now so now dynamically loaded libs are
available.
  • Loading branch information
marquiz committed Aug 29, 2022
1 parent 883c0e9 commit 04454e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cri-resmgr-agent/Dockerfile
Expand Up @@ -12,7 +12,7 @@ RUN go mod download
# Build webhook, fully statically linked binary
COPY . .

RUN CGO_ENABLED=0 make BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe"
RUN CGO_ENABLED=0 make build-static BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe"

FROM scratch as final

Expand Down
2 changes: 1 addition & 1 deletion cmd/cri-resmgr-webhook/Dockerfile
Expand Up @@ -12,7 +12,7 @@ RUN go mod download
# Build webhook, fully statically linked binary
COPY . .

RUN CGO_ENABLED=0 make BUILD_DIRS=cri-resmgr-webhook
RUN CGO_ENABLED=0 make build-static BUILD_DIRS=cri-resmgr-webhook

FROM scratch as final

Expand Down

0 comments on commit 04454e1

Please sign in to comment.