# ============================================================================== # OFELIA-WITH-BOOTSTRAP # Alpine base + Ofelia binary (copied from the official BusyBox image) # + Docker CLI + pipeline tools. # ============================================================================== FROM alpine:3.20 # Tools the pipeline needs at runtime. # docker-cli -> Docker client (NOT the daemon) # ca-certificates, curl, jq -> API probing, JSON parsing # util-linux -> provides uuidgen on Alpine # bc -> floating-point math for CPU conversion # bash -> pipeline shebang is #!/usr/bin/env bash # tini -> PID 1 init, mirrors the official image RUN apk add --no-cache \ docker-cli \ ca-certificates \ curl \ jq \ util-linux \ bc \ bash \ tini # Copy the static Ofelia binary out of the official image. # Path confirmed via docker export: /usr/bin/ofelia COPY --from=ghcr.io/netresearch/ofelia:latest /usr/bin/ofelia /usr/bin/ofelia # Bake in the pipeline. COPY pipeline /app/pipeline RUN chmod +x /app/pipeline # Mirror the official image's ENTRYPOINT/CMD so a bare `docker run` # behaves identically: tini as PID 1, then ofelia daemon. ENTRYPOINT ["/sbin/tini", "-g", "--", "/usr/bin/ofelia"] CMD ["daemon", "--config", "/etc/ofelia/config.ini"]