2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-23 03:41:23 +00:00
pict-rs/docker/prod/manifest.sh

44 lines
1,015 B
Bash
Raw Normal View History

#!/usr/bin/env bash
function require() {
if [ "$1" = "" ]; then
echo "input '$2' required"
print_help
exit 1
fi
}
function print_help() {
echo "deploy.sh"
echo ""
echo "Usage:"
2021-09-06 20:26:30 +00:00
echo " manifest.sh [repo] [tag]"
echo ""
echo "Args:"
2021-09-06 20:26:30 +00:00
echo " repo: The docker repository to update"
echo " tag: The git tag to be applied to the image manifest"
}
2021-09-06 20:26:30 +00:00
REPO=$1
TAG=$2
2021-09-06 20:26:30 +00:00
require "$REPO" "repo"
require "$TAG" "tag"
set -xe
2021-09-06 20:26:30 +00:00
sudo docker manifest create asonix/$REPO:$TAG \
-a asonix/$REPO:arm64v8-$TAG \
-a asonix/$REPO:arm32v7-$TAG \
-a asonix/$REPO:amd64-$TAG
2020-06-08 20:31:25 +00:00
2021-09-06 20:26:30 +00:00
sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/$REPO:arm64v8-$TAG --os linux --arch arm64 --variant v8
2020-06-08 20:31:25 +00:00
2021-09-06 20:26:30 +00:00
sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/$REPO:arm32v7-$TAG --os linux --arch arm --variant v7
2020-10-11 01:27:57 +00:00
2021-09-06 20:26:30 +00:00
sudo docker manifest annotate asonix/$REPO:$TAG \
asonix/$REPO:amd64-$TAG --os linux --arch amd64
2021-09-06 20:26:30 +00:00
sudo docker manifest push asonix/$REPO:$TAG --purge