Multi-arch image
This commit is contained in:
1 parent
cc1927047e
commit
420adfc584
1 file changed
+10
-7
+10
-7
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
version=1.0.1
|
||||
version=1.0.2
|
||||
platforms="linux/amd64,linux/arm64"
|
||||
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
echo "Uncommitted changes exist"
|
||||
@@ -13,12 +14,14 @@ if git rev-parse "v${version}" >/dev/null 2>&1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker build --no-cache -t fasttext-lid-server .
|
||||
# Set up buildx builder
|
||||
docker buildx create --use --name multi-arch-builder --platform ${platforms}
|
||||
|
||||
# Build and push multi-arch images
|
||||
docker buildx build --platform ${platforms} \
|
||||
--tag mariozechner/fasttext-lid-server:latest \
|
||||
--tag mariozechner/fasttext-lid-server:${version} \
|
||||
--push .
|
||||
|
||||
git tag "v${version}"
|
||||
git push origin "v${version}"
|
||||
|
||||
docker tag fasttext-lid-server mariozechner/fasttext-lid-server:latest
|
||||
docker push mariozechner/fasttext-lid-server:latest
|
||||
docker tag fasttext-lid-server mariozechner/fasttext-lid-server:${version}
|
||||
docker push mariozechner/fasttext-lid-server:${version}
|
||||
Reference in new issue
Block a user