Containerfile 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. # usmrad — Rapid Application Deployment supervisor image.
  2. #
  3. # Build context: the repo root (nothing local is required — USM and usmrad
  4. # both arrive via the hosted installer, which bundles usmrad):
  5. #
  6. # podman build -f containers/usmrad/Containerfile -t usmrad .
  7. #
  8. # bash is required by usm scripts, git by usmrad at runtime, and curl +
  9. # ca-certificates for https fetches. The installer auto-detects apk on PATH,
  10. # wires the usm-spm-apk helper plus the lib libdir into the generated
  11. # usm.config, and shims both usm and usmrad into /usr/bin.
  12. #
  13. # The system is enrolled and the web-stack repository added at build time so
  14. # its packages (statum, astralis, inversion, the invercargill libraries, …)
  15. # resolve immediately; USMRAD_USM_REPOS adds further repositories at runtime.
  16. #
  17. # Run pattern:
  18. #
  19. # podman run --rm \
  20. # -e USMRAD_REPO=https://git.example/my-app.git \
  21. # -e USMRAD_BRANCH=main \
  22. # -e USMRAD_POLL=1 \
  23. # -v ./data:/app/pwd \
  24. # usmrad my-app --port 8080
  25. FROM alpine:latest
  26. RUN apk add --no-cache bash git curl ca-certificates
  27. RUN curl -fsSL https://packages.astrologue.nz/install-usm.sh -o /tmp/install-usm.sh \
  28. && sh /tmp/install-usm.sh -y \
  29. && rm /tmp/install-usm.sh
  30. RUN usm enroll -y \
  31. && usm add-repo -y https://packages.astrologue.nz/repo/web-stack/repo.usmr
  32. ENTRYPOINT ["usmrad"]