backup-server/build.sh
Andrew Davidson 28ac33b724
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
adding push command to build.sh, fix login command
2023-03-03 22:39:57 -08:00

31 lines
879 B
Bash

#!/bin/bash
CONTAINER_NAME=backup-server
CONTAINER_HOST=git.andr3w.net
CONTAINER_USER=amd
docker buildx build \ --platform linux/$CONTAINER_USER64 \
-t $CONTAINER_NAME \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:latest \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:$(date -I) \
.
docker buildx build \
--platform linux/arm64 \
-t $CONTAINER_NAME \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:latest \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:$(date -I) \
.
docker buildx build \
--platform linux/arm/v7 \
-t $CONTAINER_NAME \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:latest \
-t $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME:$(date -I) \
.
echo $push_token
docker login -u=amd -p=$push_token $CONTAINER_HOST
docker push -a $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME