blumeops/containers/kiwix-serve/Dockerfile

55 lines
1.8 KiB
Text
Raw Normal View History

# kiwix-serve container
# Downloads pre-built binary from kiwix mirror
ARG CONTAINER_APP_VERSION=3.8.2
Tier 1 version bumps (#186) ## Summary Audit and upgrade of all deployed images, helm charts, and custom container Dockerfiles to latest stable versions. This PR covers Tier 1 (low-risk minor/patch bumps only). ### Upstream images | Image | Old | New | |-------|-----|-----| | kube-state-metrics | v2.13.0 | v2.18.0 | | prometheus | v3.2.1 | v3.9.1 | | loki | 3.3.2 | 3.6.5 | | alloy | v1.5.1 | v1.13.1 | | tailscale (proxy + operator) | v1.92.5 | v1.94.1 | | navidrome | :latest | v0.60.3 (pinned) | ### Helm charts | Chart | Old | New | |-------|-----|-----| | CloudNativePG | v0.27.0 | v0.27.1 | | 1Password Connect | 2.2.1 | 2.3.0 | ### Custom containers (Dockerfiles updated, images not yet tagged) | Container | Changes | New tag | |-----------|---------|---------| | miniflux | 2.2.16→2.2.17 (security), alpine 3.22 | v1.1.0 | | kubectl | v1.34.1→v1.34.4, alpine 3.22 | v1.1.0 | | kiwix-serve | alpine 3.22 | v1.1.0 | | nettest | alpine 3.22 | v0.14.0 | | transmission | alpine 3.22, pkg 4.0.6-r4 | v1.1.0 | All custom containers verified with local `dagger call build`. ### Deferred to Tier 2 (separate PRs) - Forgejo runner 6→12 (major version scheme change) - Docker DinD 27→29 - Grafana chart 8→11 (repo migration) - External Secrets 1→2 (breaking changes) - Python 3.12→3.13, Elixir 1.18→1.19, Node 22→24 - Transmission 4.0.6→4.1.0 (not in Alpine yet) ## Deployment After merge: 1. Tag custom containers: `mise run container-tag-and-release <name> <version>` for each 2. Wait for CI builds to complete 3. `argocd app sync apps` then sync individual apps, or let ArgoCD auto-detect Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/186
2026-02-13 17:16:37 -08:00
FROM alpine:3.22
ARG TARGETPLATFORM
ARG CONTAINER_APP_VERSION
ARG KIWIX_VERSION=${CONTAINER_APP_VERSION}
RUN set -e && \
apk --no-cache add dumb-init curl && \
# Detect architecture - use TARGETPLATFORM if set, otherwise detect from uname
if [ -n "$TARGETPLATFORM" ]; then \
echo "TARGETPLATFORM: $TARGETPLATFORM"; \
case "$TARGETPLATFORM" in \
linux/arm64*) ARCH="aarch64" ;; \
linux/amd64*) ARCH="x86_64" ;; \
*) ARCH="" ;; \
esac; \
else \
echo "TARGETPLATFORM not set, detecting from uname..."; \
UNAME_ARCH=$(uname -m); \
echo "uname -m: $UNAME_ARCH"; \
case "$UNAME_ARCH" in \
aarch64|arm64) ARCH="aarch64" ;; \
x86_64) ARCH="x86_64" ;; \
*) ARCH="" ;; \
esac; \
fi && \
if [ -z "$ARCH" ]; then \
echo "ERROR: Unsupported architecture"; \
exit 1; \
fi && \
url="http://mirror.download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-$ARCH-$KIWIX_VERSION.tar.gz" && \
echo "URL: $url" && \
curl -k -L $url | tar -xz -C /usr/local/bin/ --strip-components 1 && \
apk del curl
ARG CONTAINER_APP_VERSION
LABEL org.opencontainers.image.title="kiwix-serve"
LABEL org.opencontainers.image.description="Kiwix content server for offline ZIM files"
LABEL org.opencontainers.image.version="${CONTAINER_APP_VERSION}"
LABEL org.opencontainers.image.source="https://forge.eblu.me/eblume/blumeops"
LABEL org.opencontainers.image.vendor="blumeops"
EXPOSE 80
# Run as non-root
RUN adduser -D -u 1000 kiwix
USER kiwix
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["/bin/sh", "-c", "echo 'Use: kiwix-serve [options] <zim-files>' && kiwix-serve --help"]