@@ -13,8 +13,6 @@ MINIMUM_SUPPORTED_GO_MAJOR_VERSION = 1
13MINIMUM_SUPPORTED_GO_MINOR_VERSION = 15
13MINIMUM_SUPPORTED_GO_MINOR_VERSION = 15
14GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
14GO_VERSION_VALIDATION_ERR_MSG = Golang version is not supported, please update to at least $(MINIMUM_SUPPORTED_GO_MAJOR_VERSION).$(MINIMUM_SUPPORTED_GO_MINOR_VERSION)
16−DOCKER_BUILD := docker build --build-arg VERSION=${VERSION}
18ifeq ($(COVER),true)
16ifeq ($(COVER),true)
19TESTCOVER ?= -coverprofile c.out
17TESTCOVER ?= -coverprofile c.out
@@ -41,9 +39,12 @@ build: validate-go-version clean $(BINARY)
42 GO111MODULE=on CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -ldflags="-X main.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
40 GO111MODULE=on CGO_ENABLED=0 $(GO) build -a -installsuffix cgo -ldflags="-X main.VERSION=${VERSION}" -o $@ github.com/oauth2-proxy/oauth2-proxy/v7
42+DOCKER_BUILD := docker build --build-arg VERSION=${VERSION}
43+DOCKER_BUILDX := docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v6 --build-arg VERSION=${VERSION}
44.PHONY: docker
45.PHONY: docker
46− $(DOCKER_BUILD) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
47+ $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
48.PHONY: docker-all
49.PHONY: docker-all
49docker-all: docker
50docker-all: docker
@@ -57,7 +58,7 @@ docker-all: docker
58.PHONY: docker-push
59.PHONY: docker-push
59docker-push:
60docker-push:
60− docker push $(REGISTRY)/oauth2-proxy:latest
61+ docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v6 -t $(REGISTRY)/oauth2-proxy:latest .
62.PHONY: docker-push-all
63.PHONY: docker-push-all
63docker-push-all: docker-push
64docker-push-all: docker-push