aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSergey Fayngold2021-06-05 00:43:56 +0200
committerNBZ4live2021-06-05 02:46:55 +0200
commit32f9fcbd68f3fc8f3144d3fb3fe83ee59437a5e6 (patch)
treeea4bafda4e1662d5ac9181334b727039d0ac8729 /Makefile
parentec49e551891baba27666abaa5363eed1e83f4f9b (diff)
downloadlanguagetool-32f9fcbd68f3fc8f3144d3fb3fe83ee59437a5e6.tar.gz
Add arm support by switching to openjdk:16-slim-buster and buildx
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e17c249..e8c9d31 100644
--- a/Makefile
+++ b/Makefile
@@ -5,13 +5,14 @@ envout:
@echo "VERSION=$(VERSION)"
@echo "BUILDARG_VERSION=$(BUILDARG_VERSION)"
@echo "IMAGENAME=$(IMAGENAME)"
+ @echo "BUILDARG_PLATFORM=$(BUILDARG_PLATFORM)"
prepare:
sudo apt-get -qq -y install curl
build:
- docker build $(BUILDARG_VERSION) -t $(IMAGENAME):latest .
- docker tag $(IMAGENAME):latest $(IMAGENAME):$(VERSION)
+ docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest .
+ docker buildx build $(BUILDARG_VERSION) --load -t $(IMAGENAME):latest .
test: test-cleanup.1
test: TESTIPADDRESS=$(subst ",,$(shell docker inspect languagetool | jq '.[0].NetworkSettings.IPAddress'))
@@ -23,7 +24,7 @@ test: test-run-test-fr
test: test-cleanup.2
test-start:
- docker run -d --name languagetool -p 8010:8010 $(IMAGENAME):$(VERSION)
+ docker run -d --name languagetool -p 8010:8010 $(IMAGENAME):latest
sleep 3
test-print-ip-address:
@@ -60,5 +61,5 @@ tag: tag-push
.PHONY: tag-push
tag-push:
- docker push $(IMAGENAME):latest
- docker push $(IMAGENAME):$(VERSION)
+ docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):latest . --push
+ docker buildx build $(BUILDARG_VERSION) $(BUILDARG_PLATFORM) -t $(IMAGENAME):$(VERSION) . --push