Files
fuelish/build-image.sh
T
ml 516f5d3b7d
build / build (push) Failing after 14s
Add HTTP API server, Android app, and CI build/publish pipeline
- docker-compose.yml + tooling-container/src/server.py: serve
  preprocess/OCR/extract over an async job API (POST /jobs, GET
  /jobs/{id}) instead of manual host-script runs per receipt
- android/: Kotlin/Compose app - capture a receipt photo, poll job
  progress, review/edit extracted fields, save locally (Room), export
  to CSV/ODS
- .gitea/workflows/build.yml: build the debug APK and publish it to
  dl.ladkau.de on push
- build-image.sh: also pull ollama/ollama so all pipeline images are
  ready after one script
- add project logo (also used for the app's launcher icon/splash)
2026-09-29 12:58:58 +02:00

40 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Builds the fuelish tools image (tooling-container/Dockerfile) locally, tagged with
# tooling-container/VERSION and :latest, and pulls the other image the pipeline
# needs (ollama/ollama, used by 0_run_ollama.sh) so all images are ready before
# a pipeline run. Does not push - test it with the numbered pipeline scripts
# first, then publish with ./upload-image.sh.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
ROOT="$(pwd)"
fail() { echo "PREFLIGHT FAIL: $*" >&2; exit 1; }
command -v docker >/dev/null 2>&1 \
|| fail "docker not found in PATH"
IMAGE="${REGISTRY_IMAGE:-fuelish/tools}"
if [ -f "$ROOT/registry.env" ]; then
# shellcheck disable=SC1091
source "$ROOT/registry.env"
IMAGE="${REGISTRY_IMAGE:-$IMAGE}"
fi
VERSION="$(<"$ROOT/tooling-container/VERSION")"
[ -n "$VERSION" ] || fail "tooling-container/VERSION is empty"
echo "== Building $IMAGE:$VERSION =="
docker build \
-f "$ROOT/tooling-container/Dockerfile" \
-t "$IMAGE:$VERSION" \
-t "$IMAGE:latest" \
"$ROOT/tooling-container"
echo "== Pulling ollama/ollama (used by 0_run_ollama.sh) =="
docker pull ollama/ollama
echo "== Done =="
echo "Image: $IMAGE:$VERSION (and :latest)"
echo "Test it with the numbered pipeline scripts, then publish with ./upload-image.sh"