Skip to content

Commit

Permalink
Remove code directories from .dockerignore (#633)
Browse files Browse the repository at this point in the history
Remove pkg cmd and vendor from .dockerignore, as it causes builds
with Docker and the build/Dockerfile.*openshift builds to fail.
This is due to them being multistage builds.

The error is:

Step 4/10 : RUN go build --mod=vendor -o build/_output/bin/manager main.go
---> Running in 946711c1028e
go: inconsistent vendoring in /go/src/github.com/openshift/kubernetes-nmstate:

This is caused by the vendor directory not being present. This does not affect
Podman builds.

The multistage builds need to have a complete picture, so we need
to include these directories in the build context. This will allow the
regular Dockerfiles to also be migrated to a multistage build approach,
which is desirable.

Signed-off-by: Brad P. Crochet <[email protected]>
  • Loading branch information
bcrochet authored Nov 12, 2020
1 parent 9aecb58 commit 9dcb314
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ _kubevirtci
kubevirtci

# No need for source code is already compiled
pkg
cmd
vendor
docs

# Test and infra
Expand Down

0 comments on commit 9dcb314

Please sign in to comment.