diff --git a/pkg/adapter/nimbus-kyverno/Dockerfile b/pkg/adapter/nimbus-kyverno/Dockerfile index 9c9a085c..5f2f8d5e 100644 --- a/pkg/adapter/nimbus-kyverno/Dockerfile +++ b/pkg/adapter/nimbus-kyverno/Dockerfile @@ -10,7 +10,6 @@ WORKDIR /nimbus # relative deps requried by the adapter ADD api/ api/ -ADD internal/ internal/ ADD pkg/ pkg/ ADD go.mod go.mod ADD go.sum go.sum diff --git a/pkg/adapter/nimbus-kyverno/Makefile b/pkg/adapter/nimbus-kyverno/Makefile index 02812d8c..021e2bcf 100644 --- a/pkg/adapter/nimbus-kyverno/Makefile +++ b/pkg/adapter/nimbus-kyverno/Makefile @@ -31,6 +31,6 @@ docker-buildx: sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - $(CONTAINER_TOOL) buildx create --name project-v3-builder $(CONTAINER_TOOL) buildx use project-v3-builder - - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg VERSION=${TAG} --tag ${IMG}:${TAG} -f Dockerfile.cross . || { $(CONTAINER_TOOL) buildx rm project-v3-builder; rm Dockerfile.cross; exit 1; } + - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg VERSION=${TAG} --tag ${IMG}:${TAG} -f Dockerfile.cross ../../../ || { $(CONTAINER_TOOL) buildx rm project-v3-builder; rm Dockerfile.cross; exit 1; } - $(CONTAINER_TOOL) buildx rm project-v3-builder rm Dockerfile.cross diff --git a/pkg/adapter/nimbus-netpol/Dockerfile b/pkg/adapter/nimbus-netpol/Dockerfile index 5e7c1c57..a163b5cc 100644 --- a/pkg/adapter/nimbus-netpol/Dockerfile +++ b/pkg/adapter/nimbus-netpol/Dockerfile @@ -8,9 +8,7 @@ ARG TARGETARCH WORKDIR /nimbus - # relative deps requried by the adapter - ADD api/ api/ ADD pkg/ pkg/ ADD go.mod go.mod @@ -33,7 +31,6 @@ COPY $ADAPTER_DIR/processor processor COPY $ADAPTER_DIR/watcher watcher COPY $ADAPTER_DIR/main.go main.go - # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command # was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO diff --git a/pkg/adapter/nimbus-netpol/Makefile b/pkg/adapter/nimbus-netpol/Makefile index d0e82fe1..e1a8f9ea 100644 --- a/pkg/adapter/nimbus-netpol/Makefile +++ b/pkg/adapter/nimbus-netpol/Makefile @@ -31,6 +31,6 @@ docker-buildx: sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross - $(CONTAINER_TOOL) buildx create --name project-v3-builder $(CONTAINER_TOOL) buildx use project-v3-builder - - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg VERSION=${TAG} --tag ${IMG}:${TAG} -f Dockerfile.cross . || { $(CONTAINER_TOOL) buildx rm project-v3-builder; rm Dockerfile.cross; exit 1; } + - $(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) --build-arg VERSION=${TAG} --tag ${IMG}:${TAG} -f Dockerfile.cross ../../../ || { $(CONTAINER_TOOL) buildx rm project-v3-builder; rm Dockerfile.cross; exit 1; } - $(CONTAINER_TOOL) buildx rm project-v3-builder rm Dockerfile.cross