backup-server/build.sh
Andrew Davidson c44630ee42
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
using woodpecker credentials
2023-03-03 23:07:35 -08:00

29 lines
889 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=$PUSH_USER --password-stdin $CONTAINER_HOST
docker push -a $CONTAINER_HOST/$CONTAINER_USER/$CONTAINER_NAME