Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpolden/echoip.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d1e3518..e3a5cd5 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,14 @@ endif
geoip-download: $(databases)
+# Create an environment to build multiarch containers (https://github.com/docker/buildx/)
+docker-multiarch-builder:
+ DOCKER_BUILDKIT=1 $(DOCKER) build -o . git://github.com/docker/buildx
+ mkdir -p ~/.docker/cli-plugins
+ mv buildx ~/.docker/cli-plugins/docker-buildx
+ $(DOCKER) buildx create --name multiarch-builder --node multiarch-builder --driver docker-container --use
+ $(DOCKER) run --rm --privileged multiarch/qemu-user-static --reset -p yes
+
docker-build:
$(DOCKER) build -t $(DOCKER_IMAGE) .
@@ -46,8 +54,8 @@ docker-test:
$(eval DOCKER_PORT=$(shell $(DOCKER) port $(CONTAINER) | cut -d ":" -f 2))
curl -fsS -m 5 localhost:$(DOCKER_PORT) > /dev/null; $(DOCKER) stop $(CONTAINER)
-docker-push: docker-test docker-login
- $(DOCKER) push $(DOCKER_IMAGE)
+docker-push: docker-test docker-multiarch-builder docker-login
+ $(DOCKER) buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t $(DOCKER_IMAGE) --push .
heroku-run: geoip-download
ifndef PORT