Fix image target to build multi-arch images to the Docker Hub

This commit is contained in:
James Mills 2022-08-01 14:03:00 +10:00
parent cc036e0af1
commit c011bbae0c
No known key found for this signature in database
GPG key ID: AC4C014F1440EBD6

View file

@ -54,11 +54,10 @@ install: build ## Install tube to $DESTDIR
ifeq ($(PUBLISH), 1) ifeq ($(PUBLISH), 1)
image: generate ## Build the Docker image image: generate ## Build the Docker image
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t $(IMAGE):$(TAG) . @docker buildx build --push --platform linux/arm64,linux/amd64 --tag $(IMAGE):$(TAG) --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" .
@docker push $(IMAGE):$(TAG)
else else
image: generate image: generate
@docker build --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" -t $(IMAGE):$(TAG) . @docker buildx build --platform linux/arm64,linux/amd64 --tag $(IMAGE):$(TAG) --build-arg VERSION="$(VERSION)" --build-arg COMMIT="$(COMMIT)" .
endif endif
release: generate ## Release a new version to Gitea release: generate ## Release a new version to Gitea