docker-zerotier-planet/build.sh

12 lines
435 B
Bash
Raw Normal View History

2024-01-06 08:07:05 -05:00
#!/bin/bash
2024-05-16 17:20:33 -04:00
USER=zerotier
REPO=ZeroTierOne
latest_tag=$(curl -s "https://api.github.com/repos/$USER/$REPO/tags" | jq -r '.[].name' | grep -E "^[0-9]+\.[0-9]+\.[0-9]+$" | sort -V | tail -n 1)
2024-05-17 05:58:20 -04:00
echo "Latest tag for $USER/$REPO matching latest is: $latest_tag"
2024-05-16 17:20:33 -04:00
docker build --build-arg TAG="$latest_tag" -t "xubiaolin/zerotier-planet:$latest_tag" .
2024-05-17 05:58:20 -04:00
docker tag "xubiaolin/zerotier-planet:$latest_tag" "xubiaolin/zerotier-planet:latest"