@@ -41,36 +41,38 @@ $(BINARY):
4141
4242DOCKER_BUILD_PLATFORM ?= linux/amd64,linux/arm64,linux/arm/v6
4343DOCKER_BUILDX_ARGS ?=
44−DOCKER_BUILD := docker build --build-arg VERSION=${VERSION}
45−DOCKER_BUILDX := docker buildx build ${DOCKER_BUILDX_ARGS} --platform ${DOCKER_BUILD_PLATFORM} --build-arg VERSION=${VERSION}
44+DOCKER_BUILDX := docker buildx build ${DOCKER_BUILDX_ARGS} --build-arg VERSION=${VERSION}
45+DOCKER_BUILDX_X_PLATFORM := $(DOCKER_BUILDX) --platform ${DOCKER_BUILD_PLATFORM}
46+DOCKER_BUILDX_PUSH := docker buildx build --push
47+DOCKER_BUILDX_PUSH_X_PLATFORM := $(DOCKER_BUILDX_PUSH) --platform ${DOCKER_BUILD_PLATFORM}
4648
4749.PHONY: docker
4850docker:
49− $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
51+ $(DOCKER_BUILDX_X_PLATFORM) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest .
5052
5153.PHONY: docker-all
5254docker-all: docker
53− $(DOCKER_BUILD) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
54− $(DOCKER_BUILD) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION} .
55− $(DOCKER_BUILD) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
56− $(DOCKER_BUILD) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
57− $(DOCKER_BUILD) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
58− $(DOCKER_BUILD) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
59− $(DOCKER_BUILD) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
55+ $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
56+ $(DOCKER_BUILDX_X_PLATFORM) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION} .
57+ $(DOCKER_BUILDX) -f Dockerfile -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
58+ $(DOCKER_BUILDX) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
59+ $(DOCKER_BUILDX) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
60+ $(DOCKER_BUILDX) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
61+ $(DOCKER_BUILDX) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
6062
6163.PHONY: docker-push
6264docker-push:
63− docker buildx build --push --platform ${DOCKER_BUILD_PLATFORM} -t $(REGISTRY)/oauth2-proxy:latest .
65+ $(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/oauth2-proxy:latest .
6466
6567.PHONY: docker-push-all
6668docker-push-all: docker-push
67− docker push $(REGISTRY)/oauth2-proxy:latest-amd64
68− docker push $(REGISTRY)/oauth2-proxy:${VERSION}
69− docker push $(REGISTRY)/oauth2-proxy:${VERSION}-amd64
70− docker push $(REGISTRY)/oauth2-proxy:latest-arm64
71− docker push $(REGISTRY)/oauth2-proxy:${VERSION}-arm64
72− docker push $(REGISTRY)/oauth2-proxy:latest-armv6
73− docker push $(REGISTRY)/oauth2-proxy:${VERSION}-armv6
69+ $(DOCKER_BUILDX_PUSH) -t $(REGISTRY)/oauth2-proxy:latest-amd64 .
70+ $(DOCKER_BUILDX_PUSH_X_PLATFORM) -t $(REGISTRY)/oauth2-proxy:${VERSION} .
71+ $(DOCKER_BUILDX_PUSH) -t $(REGISTRY)/oauth2-proxy:${VERSION}-amd64 .
72+ $(DOCKER_BUILDX_PUSH) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:latest-arm64 .
73+ $(DOCKER_BUILDX_PUSH) -f Dockerfile.arm64 -t $(REGISTRY)/oauth2-proxy:${VERSION}-arm64 .
74+ $(DOCKER_BUILDX_PUSH) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:latest-armv6 .
75+ $(DOCKER_BUILDX_PUSH) -f Dockerfile.armv6 -t $(REGISTRY)/oauth2-proxy:${VERSION}-armv6 .
7476
7577.PHONY: generate
7678generate: