File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RUN go mod download
1414# Copy the go source
1515COPY cmd/main.go cmd/main.go
1616COPY api/ api/
17- COPY internal/controller/ internal/controller /
17+ COPY internal/ internal/
1818
1919# Build
2020# the GOARCH has not a default value to allow the binary be built according to the host where the command
Original file line number Diff line number Diff line change 11
22# Image URL to use all building/pushing image targets
3- IMG ?= controller :latest
3+ IMG ?= quay.io/spectrocloud-labs/validator-plugin-kubescape :latest
44# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
55ENVTEST_K8S_VERSION = 1.27.1
66
@@ -10,6 +10,7 @@ GOBIN=$(shell go env GOPATH)/bin
1010else
1111GOBIN =$(shell go env GOBIN)
1212endif
13+ GOARCH ?= $(shell go env GOARCH)
1314
1415# CONTAINER_TOOL defines the container tool to be used for building images.
1516# Be aware that the target commands are only tested with Docker which is
@@ -79,7 +80,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
7980# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8081.PHONY : docker-build
8182docker-build : test # # Build docker image with the manager.
82- $(CONTAINER_TOOL ) build -t ${IMG} .
83+ $(CONTAINER_TOOL ) build -t ${IMG} . --platform linux/ $( GOARCH )
8384
8485.PHONY : docker-push
8586docker-push : # # Push docker image with the manager.
You can’t perform that action at this time.
0 commit comments