#!/usr/bin/env bash # Builds a local dev image for trying things out on your own machine. # Pushes NOTHING to the registry -- the build stays private on the laptop. # # The tag carries the current branch name so dev images are not confused with # the production :latest. Afterwards start it locally, e.g.: # docker run --rm -p 5000:8080 elternbeirat-web:dev- # or via the local compose.yaml. set -euo pipefail cd "$(dirname "$0")/.." branch="$(git rev-parse --abbrev-ref HEAD | tr '/' '-')" tag="elternbeirat-web:dev-$branch" echo "Building local dev image: $tag (no push)" docker build -t "$tag" . echo echo "Done. Start it locally, e.g. with:" echo " docker run --rm -p 5000:8080 $tag"