Some checks failed
Docker / docker (push) Has been cancelled
- docker/build-and-push.sh: build and push image to forge registry from any machine with Docker (run directly on Unraid terminal) - docker/act_runner.compose.yml: Gitea act_runner setup to automate Docker builds via Gitea Actions on Unraid Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
721 B
Bash
Executable File
32 lines
721 B
Bash
Executable File
#!/bin/bash
|
|
# Build and push nabarr Docker image to the Gitea container registry.
|
|
# Run this script on any machine that has Docker and can reach forge.dilain.com.
|
|
#
|
|
# Usage:
|
|
# ./docker/build-and-push.sh [TAG]
|
|
# TAG defaults to "latest"
|
|
#
|
|
# Example:
|
|
# ./docker/build-and-push.sh
|
|
# ./docker/build-and-push.sh master
|
|
|
|
set -e
|
|
|
|
REGISTRY="forge.dilain.com"
|
|
IMAGE="${REGISTRY}/laurent/nabarr"
|
|
TAG="${1:-latest}"
|
|
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
echo "==> Building ${IMAGE}:${TAG}"
|
|
docker build \
|
|
--platform linux/amd64 \
|
|
-t "${IMAGE}:${TAG}" \
|
|
-f "${REPO_ROOT}/docker/Dockerfile" \
|
|
"${REPO_ROOT}"
|
|
|
|
echo "==> Pushing ${IMAGE}:${TAG}"
|
|
docker push "${IMAGE}:${TAG}"
|
|
|
|
echo "==> Done: ${IMAGE}:${TAG}"
|