Skip to content

Commit

Permalink
kata-webhook: simplify building kata-webhook container
Browse files Browse the repository at this point in the history
Before one can build the container image the vendor directory from the
parent directory has to be copied to the kata-webhook directory.
Otherwise the build will fail because it can't find all necessary
packages. See issue kata-containers#2479

This is solved on the master branch for Kata 1.x by adding a manual step
to the README.md.

We can avoid this manual step  by copying in the vendor directory during
the docker build.

The vendor directory is ~28 megs and it takes less than a second to copy
it into the build env, so no noticeable slow down.

Fixes: kata-containers#3230

Signed-off-by: Jens Freimann <[email protected]>
  • Loading branch information
jensfr authored and GabyCT committed Feb 22, 2021
1 parent 4c6aa15 commit 85b204a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kata-webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ FROM golang:latest AS builder

WORKDIR /go/src/kata-pod-annotate

COPY ../vendor ./
COPY . ./
RUN CGO_ENABLED=0 go build -o /go/bin/kata-pod-annotate

Expand Down

0 comments on commit 85b204a

Please sign in to comment.