# Runtime image for zddc-server. # # Bundles the conversion toolchain (pandoc + chromium + bubblewrap) so # the MD→DOCX/HTML/PDF endpoint works without an external container # engine. The convert package's bwrap engine (production default) # sandboxes each pandoc/chromium invocation in a fresh Linux-namespace; # no daemon, no socket, no privileged outer container, no OCI image # pull at conversion time. # # Used by helm charts (helm/zddc-server-prod/) as the main-container # image. The build is independent of zddc-server itself — the binary # is built by the helm chart's init container from a pinned git ref # and copied into this runtime image's filesystem at start. Image # tags should track the upstream package versions (pandoc, chromium) # more than zddc-server, since the binary is layered in at deploy time. # # Build: # podman build -t zddc-server-runtime:latest \ # -f zddc/runtime.Containerfile zddc/ # # Publish (example): # podman tag zddc-server-runtime:latest \ # codeberg.org/varasys/zddc-server-runtime:vYYYYMMDD # podman push codeberg.org/varasys/zddc-server-runtime:vYYYYMMDD # # Size: ≈ 1 GB unpacked (chromium dominates). Container engines # layer + dedupe the chromium libs across replicas on the same node. FROM docker.io/library/alpine:3 RUN apk add --no-cache \ bubblewrap \ pandoc-cli \ chromium \ font-noto \ ca-certificates # The init container in helm/zddc-server-*/templates/deployment.yaml # writes the compiled zddc-server binary to /zddc/zddc-server in a # shared emptyDir volume; the main container's command is # `/zddc/zddc-server`. No CMD/ENTRYPOINT here because the binary # path is provided by the chart, not baked into the image.