Class DockerBootstrap

java.lang.Object
org.fhirfrog.frog.server.bootstrap.DockerBootstrap

public class DockerBootstrap extends Object
Performs a one-time HAPI FHIR bootstrap and captures the loaded server state as a committed Docker image plus a pg_dump SQL file.

This class encapsulates the Docker lifecycle orchestration without any build-tool dependency (Ant, Maven, etc.). Status messages are emitted via a logger.

The bootstrap sequence:

  1. Checks whether imageTag exists locally and pgDumpFile exists on disk — exits early if both present
  2. Runs docker compose --profile bootstrap up -d
  3. Polls liveness/readiness via HTTP until HAPI is ready
  4. Stops HAPI cleanly, dumps postgres via pg_dump, stops postgres
  5. Commits the HAPI container as imageTag
  6. Tears down bootstrap containers in a finally block