forked from constverum/ProxyBroker
-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
docker-build.sh
executable file
·33 lines (24 loc) · 1.09 KB
/
docker-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
VERSION=v2.0.0-alpha6
docker build --pull -t bluet/proxybroker2 .
docker scan bluet/proxybroker2:latest
docker tag bluet/proxybroker2:latest bluet/proxybroker2:${VERSION}
while true; do
read -p "Add new git tag ${VERSION} and push? (Have you git add and git commit already?) [y/N]" yn
case $yn in
[Yy]* ) git tag "${VERSION}" -a -m "${VERSION}" && git push && git push --tags; break;;
[Nn]* ) exit;;
* ) echo "";;
esac
done
# Fixes busybox trigger error https://github.com/tonistiigi/xx/issues/36#issuecomment-926876468
docker run --privileged -it --rm tonistiigi/binfmt --install all
docker buildx create --use
while true; do
read -p "Build for multi-platform and push? (Have I Updated VERSION Info? Is the latest VERSION=${VERSION} ?) [y/N]" yn
case $yn in
[Yy]* ) docker buildx build -t bluet/proxybroker2:latest -t bluet/proxybroker2:${VERSION} --platform linux/amd64,linux/arm64/v8 --pull --push .; break;;
[Nn]* ) exit;;
* ) echo "";;
esac
done