Docker images and docker-compose setup for running CKAN (open data portal) on Alpine Linux. Images are published to Docker Hub (keitaro/ckan) and GitHub Container Registry (ghcr.io/keitaroinc/ckan).
images/ckan/<version>/— multi-stage Dockerfiles for each supported CKAN version (2.10, 2.11); each directory also contains asetup/folder with runtime scriptscompose/— docker-compose setup for local/production deploymentscompose/docker-compose.yml— top-level compose file that includes per-service YAML filescompose/services/— per-service compose definitions:ckan,ckan-workers(default/bulk/priority),db,solr,rediscompose/config/— env files per service (ckan/.env,db/.env,solr/.env,redis/.env) plus.global-envfor shared vars (e.g.CKAN_VERSION,REDIS_VERSION)scripts/update_dockerfiles.sh— script to auto-update pinned Alpine package versions in all Dockerfiles.github/workflows/— CI (lint + build + security scan on PRs), publish on merge tomaster, and automated Dockerfile package update workflow
Build a specific version image:
docker build --tag ghcr.io/keitaroinc/ckan:2.11.2 images/ckan/2.11Run the full stack locally:
cd compose
docker compose build
docker compose up -dImages are automatically built and pushed to Docker Hub and GHCR on merge to master via GitHub Actions. The image tag is read from the IMAGE_TAG env var in each Dockerfile.
- Base image is Alpine Linux (
python:<version>-alpine); all system packages must be pinned to exact versions (e.g.git=2.49.1-r0). - Use
uvfor all Python/CKAN package installation — it is pre-installed in the images. - To extend an image, inherit
FROM ghcr.io/keitaroinc/ckan:<version>and install extra extensions viauv pip install --system. - Custom init scripts go in
docker-entrypoint.d/(run beforeprerun.py) and post-init scripts indocker-afterinit.d/(run after). - CKAN config is managed via environment variables using the
ckanext-envvarsextension; prefix env vars withCKAN__to map tockan.inisettings. - The default branch is
master.