#!/usr/bin/env bash
set -euo pipefail

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
COMPETITION_IMAGE="lymphosat-export-competition"
SOLVER_IMAGE="lymphosat-export-solver"

docker build --platform linux/amd64 \
    -f "$ROOT/competition.Dockerfile" \
    -t "$COMPETITION_IMAGE" \
    "$ROOT"

docker build --platform linux/amd64 \
    --build-arg "COMPETITION_IMAGE=$COMPETITION_IMAGE" \
    -f "$ROOT/Dockerfile" \
    -t "$SOLVER_IMAGE" \
    "$ROOT"
