Building CKAN Docker images with your extensions: when your portal needs its own image
A custom CKAN Docker image holds the CKAN release your portal runs, your theme, your extensions and their Python requirements, layered on top of the ckan/ckan-base image. Teams build one when templates, CSS, translations and extensions must be present when the container starts and cannot be edited by hand inside running containers. CKAN is open-source data management software licensed under the GNU Affero General Public License v3.0, so your team should confirm with counsel what that license requires when you modify CKAN and offer the portal to users over a network.
The image is the unit your team tests, approves and promotes. One build from one commit produces one tagged image, which moves from test to staging to production unchanged, so the code that passed review is the code that runs. Three decisions shape that flow: the CKAN version you pin, the exact version of each extension, and who owns the build pipeline. Check compatibility before you pin. The ckanext-dcat extension, for example, is supported on CKAN 2.10 and 2.11, so a team considering CKAN 2.12.0, released August 26, 2026, must confirm a supported extension version before it builds. Ask each extension maintainer for its compatibility statement in writing.
Plan for patch releases. CKAN patch releases do not break backwards compatibility and exclude schema changes and new features, while minor releases may include backwards-incompatible changes, so a minor version move needs its own test cycle. The CKAN release policy states that the tech team supports the latest patch of the current minor version and the previous minor version, and older patches lose support once a newer one is out. Rebuild on each patch, retest, and promote the new image through the same path. Confirm with your extension maintainers how quickly they release updates after a CKAN minor release.
Only one team-built image moves through every environment
The diagram starts on the left with the public side: the official ckan/ckan-base image, selected by a pinned CKAN version tag. Your team's theme, extension code and requirements files sit inside the team trust boundary, and the build step combines them with the base image into one image pushed to your own registry. Tests and sign-off happen at the gate before anything is deployed. The same image then moves through dev, test and production, so check that each environment runs the identical artifact. Keep secrets out of the image itself and inject them at deploy time.
One team registry image moves through dev, test and production.
Which build choices fit which portal team
This table compares the four main build decisions for a CKAN image with your extensions. Each option is set against the portal team it suits, what it makes easier and what it makes harder to maintain. The main takeaway is that pinning favors repeatability and promotion favors one tested artifact, while the looser options save upkeep but add drift you must watch.
| Build choice | Fits teams that | Makes easier | Makes harder to maintain |
|---|---|---|---|
| Exact CKAN patch pin | Want every environment on identical CKAN code and will review each patch before promotion | Reproducible images and a clear record of the CKAN code under test | Each patch needs a deliberate rebuild, retest and redeploy, or the portal falls behind support |
| CKAN minor line | Want fixes picked up on rebuild and can retest each one before release | Patch updates arrive on rebuild without editing the Dockerfile | Minor releases may include backwards-incompatible changes, so a rebuild can break an extension or theme |
| Extensions from pinned requirements | Need repeatable builds and a version history for each extension | Same extension versions on every build, reviewable in version control | Each extension bump is manual, and pins need checking against each CKAN minor release |
| Extensions from unpinned packages | Run small portals where one maintainer tests each rebuild against current extension releases | Fewer requirements edits, and upstream fixes arrive on rebuild | A build can change without a code change, so a failure may come from an extension release |
| Theme bundled into the image | Promote one artifact and version the theme with the code | Theme and extensions ship together, so each environment runs the same files | Any theme change, even a small CSS edit, needs a new image and a rollout |
| Theme mounted at runtime | Have editors or designers who change templates or styles outside the release cycle | Template and style edits without rebuilding the image | Theme state outside the image can drift between environments, and rollbacks must restore mounted files too |
| Build once and promote the same image | Run several environments that must use the same tested artifact | What was tested is what runs in production, and rollbacks reuse a known image | Environment differences must live in configuration and secrets, which needs steady discipline |
| Rebuild per environment | Need different extensions or settings baked in at build time for each environment | Each build can be tailored to its environment | Builds can differ silently, so staging may not test what production runs |
Pinning CKAN: patch releases, minor releases and the support window
CKAN separates patch releases from minor releases, and that difference sets how your Dockerfile changes over time. Patch releases do not break backwards compatibility, minor releases may change behavior, and support covers only the newest patch of two lines. The cards below cover the pinned tag, the rebuild cadence and the checks before a minor move.
Patch releases stay compatible
A patch release, such as 2.11.6, does not break backwards compatibility. CKAN keeps patch releases free of schema changes and new features, so a bump should bring fixes without new features or schema changes. Pin the FROM line of your Dockerfile to an exact patch tag, so every build uses the same CKAN code until you change it on purpose. A patch bump is a rebuild with fixes only. Check that your extensions install cleanly against the new image before promoting it.
Minor releases can break
CKAN minor releases may include backwards-incompatible changes. CKAN 2.12.0 was released on August 26, 2026, and a move from 2.11 to 2.12 changes the FROM line of your Dockerfile, so it needs its own plan. Treat a minor move as an upgrade project and read the release notes before you change the tag. Test the staging build against your own templates, configuration and extensions before scheduling production.
Support covers two lines
CKAN supports the latest patch of the current minor version and the previous minor version, for security and bug fixes. Once a newer patch ships, the older patch on that line loses support. With 2.12.0 as the current minor, 2.11 is the previous line, so an image pinned to an older 2.11 patch is outside the support window. Confirm the status of 2.10 on the release policy page before you plan, since 2.10.11 shipped on the same day as 2.12.0. Only the newest patch of each supported line receives fixes.
Rebuild when a patch ships
Watch the CKAN releases page for new patches on the minor line you run, and rebuild your image when one lands. Security fixes justify a faster rebuild, because an image on an outdated patch falls outside the support window. Agree a rebuild interval with your security team and record it in your runbook. CKAN targets about two minor releases a year, so expect minor-line planning to recur at that pace. Each new patch means a new image build and a fresh test run.
CKAN releasesConfirm extensions before minor moves
Extension support is set by each extension's maintainers, so a CKAN minor move can break a plugin even when your own code is clean. The ckanext-dcat repository lists support for CKAN 2.10 and 2.11, so check its current release notes for 2.12 before you change the tag. Confirm 2.12 support for every extension in your requirements. Pin each extension to a version you have tested, and build the image from scratch to catch missing dependencies.
ckanext-dcat repositoryBuild sequence for a custom CKAN image
This sequence turns a CKAN base image, your theme and your extensions into one versioned image that your team can test and promote. Each step ends with a check you can record, so a failed step stops the build before anything reaches the team registry. Several checks depend on your own databases, search service and registry, and those are marked as such.
Choose and pin the ckan-base version
Pick the ckan/ckan-base tag that matches the CKAN version your portal will run, and pin the Dockerfile to that exact tag so every build starts from the same base. Before you commit, read the release notes for that version and the CKAN release policy, since the project supports the latest patch of the current minor version and the previous minor version. Your release owner approves the choice and records it with the build. The step is done when the FROM line names one exact tag and the approved version appears in the build record.
Add theme and extension source
Copy your theme and extension source into the build context from the repository that holds it, using the commit or release your team has tested. Keep each extension in its own directory so changes and history stay separate and easy to review. Record the commit hash for every extension in a manifest, because the image tag in the final step depends on those versions. The step is done when the build context contains only the code you intend to ship and the manifest lists each source with its commit.
Pin extension requirements
List each extension's Python dependencies in a requirements file with exact versions, and confirm each extension's compatibility notes against your CKAN version. For example, the ckanext-dcat project states support for CKAN 2.10 and 2.11, so a CKAN 2.12 target needs confirmation from the extension's maintainers or your own tests before you rely on it. Resolve the dependencies in a clean environment to catch conflicts early. The step is done when a fresh install from the requirements file completes and no dependency is left unpinned.
Install extensions into the image
Add the install commands to the Dockerfile so the pinned requirements and extension packages install into the Python environment that the base image provides. Group the installs so a change to one extension does not force a rebuild of every layer. Read the build log for resolver warnings that change package versions, and fix them before moving on. The step is done when the build log shows every extension installed and the image's installed package list matches the pinned versions.
Set configuration through environment variables
Move the settings that differ between environments into environment variables, following the naming convention your team uses for CKAN container configuration, such as the ckanext-envvars pattern. Keep secrets such as database passwords and API keys out of the Dockerfile and the image layers, and supply them at runtime from your secret store. The step is done when a container started with a sample environment file loads the plugin list and site settings you expect, and running docker history on the image shows no secret values.
Build the image
Build the image from the pinned base and the pinned sources on a clean build agent, so local files and cached layers cannot change the result. Use the same Dockerfile and build arguments that your CI pipeline will use, so the local and pipeline builds match. Record the image digest together with the ckan-base tag and the source commits. Build duration depends on your runners and cache policy, so measure it on your own infrastructure. The step is done when the build finishes without errors and the digest is written to the build record.
Run the smoke checks
Start the image against a test database, a test Solr instance and a test Redis instance, then run ckan --version inside the running container and confirm it reports the pinned CKAN version. Check the container logs for each extension loading without errors, then call the status_show action of the CKAN API and confirm the site responds. Checks that touch your database, search index, single sign-on or file storage depend on how those services are set up in your test environment, so your platform team runs them there. The step is done when every check passes and the results are saved with the build record.
Push the image with a version tag
Tag the image with a name that states the CKAN version and each extension version, for example ckan-2.12.0 followed by the extension versions in the same tag (illustrative format only). Push it to the team registry, then record the tag, the digest and the smoke-check results so later environments pull the same artifact. Registry access rules, retention settings and tag immutability depend on your registry, so confirm them with your platform team. The step is done when the registry lists the tag and its digest matches the build record.
Promoting one image through dev, test and production
The development environment is where the image is built and first run. Its job is to show that the extensions load, the theme renders and the image starts against services the team controls. Teams usually test here against a disposable stack with sample data, so failures are cheap to reproduce. The image built here is the artifact every later environment inherits, so its build record should identify the exact inputs it came from.
- Build inputs: the CKAN version is pinned to one tag, and every extension requirement is pinned to an exact version or commit.
- Configuration:
ckan.site_urlpoints at a development hostname, and the database, Solr and Redis endpoints point at development services. - Secrets: development uses throwaway values for session secrets and API tokens, never copies of production values.
- Checks: run the extension test suites, confirm plugins load at startup, and smoke test the front page and the API status endpoint.
Before the image leaves this environment, record its digest and confirm the build log shows the pinned versions.
The test environment answers whether the artifact behaves the way it will in production. It should match production on the parts that change behavior: the CKAN version, the Python base, the PostgreSQL major version, the Solr version and schema, and the set of enabled plugins. Teams usually test single sign-on against a test identity provider and run migrations here first, so schema and index changes surface before production is involved.
- Services: PostgreSQL, Solr and Redis run at the same major versions as production, and the DataStore read-only user is created the same way.
- Configuration: URLs and endpoints point at test hostnames, and identity settings point at the test identity provider.
- Data: test datasets cover the custom schema fields, private datasets and resource types the extensions handle. Avoid copying personal data into test unless your data protection terms allow it.
- Checks: run upgrade and migration steps, rebuild the search index, load and download a sample resource through XLoader, and run the extension tests against the running stack.
- Evidence: keep the test logs and the digest that passed, because that digest is the one production will receive.
Confirm that the test stack's versions match production before sign-off, since a pass on different versions proves little.
Production should receive the same image digest that passed testing, with no rebuild. What changes is the configuration supplied at runtime: hostnames, database and Solr endpoints, secrets and the storage location for uploads. Keeping those values outside the image lets operators change them without a new build, and lets reviewers compare the running digest with the tested one.
- Digest: deploy by image digest so a re-pushed tag cannot change what runs.
- Secrets: load database passwords, session secrets and API tokens from your secret store, and keep them out of the image and out of version-controlled manifests.
- Endpoints: set
ckan.site_urlto the public hostname, and pointckan.datastore.write_urlandckan.datastore.read_urlat their separate database users. - Change control: take a database backup before any migration step, and record which digest and configuration version are live.
- Rollback: keep the previous digest and its configuration available so the team can return to it without rebuilding.
Check that the running digest and configuration version match the approved change record before you close the release.
Keeping secrets, dependencies and image rebuilds under control
Keep credentials out of the image entirely. Docker stores every layer, so a token copied into the image during a build can be recovered from the image history even if a later instruction deletes it. Extensions installed from private Git repositories are the usual trap, because a deploy token in a pip install git+ line ends up in a layer. Pass these values through a BuildKit secret mount (RUN --mount=type=secret), and keep them out of ARG and ENV, since build arguments are recorded in image metadata. Database URLs, API keys and the ckan.plugins` list belong to the runtime environment, which your orchestrator injects when the container starts. Before the first push, search the image history and filesystem for token patterns, and ask your security team which secret detection tool they already run in the registry.
Pin every extension to a tagged release or a specific commit, and install from one reviewed requirements file with a constraints file so transitive packages cannot drift between builds. Check each extension's documented CKAN support before you change the CKAN version. The ckanext-dcat project, for example, is supported on CKAN 2.10 and 2.11, so a move to 2.12 needs a confirmed compatibility statement or a tested build before promotion. Put the requirements diff in the change request, with the reason for each new or changed package. The CKAN release policy explains that patch releases exclude breaking and schema changes, while minor releases can include incompatible changes. Subscribe your team to CKAN releases so an outdated patch is noticed before it loses support.
Plan rebuilds around four triggers: a change to the ckan/ckan-base image, a new CKAN patch release such as 2.12.0 or the 2.11.6 and 2.10.11 maintenance releases published the same day, an extension update, and a theme change. Pin the base image by digest so that a rebuild happens only when your team chooses it. Scan each built image in your own registry before any environment receives it, and agree in advance which findings block promotion. For every image, record the source commit, base image digest, CKAN version and build time as OCI labels and in the change ticket. Any running container can then be traced to a commit and a reviewed build. These records give your assessors evidence to review. Independent auditors and certification bodies decide whether that evidence meets their requirements, so confirm early what form they expect.
Limits to confirm before you fix the build
Each limit below depends on the CKAN version you pin and the environment you run it in, so the team should confirm them before writing the Dockerfile. Some answers come from the CKAN documentation, while others come only from the images and extension releases you actually build against. Treat the list as a checklist for the first build, then repeat it at every CKAN upgrade.
Base image tags and OS
Confirm which ckan-base tags exist for the CKAN version you pin, and which base operating system each tag uses. Check the Python version and system packages in that image before you copy any install steps into your Dockerfile for your build. Ask whether the tag still receives rebuilds, because OS security patches reach your image only when it is rebuilt on a current base.
Extension support for your CKAN version
Each extension declares which CKAN versions it supports, and the support lists differ. The ckanext-dcat repository lists support for CKAN 2.10 and 2.11, and ckanext-saml2auth supports CKAN 2.10 and later. Check every extension and theme pin against the exact CKAN version you choose, including any newer release that the extension docs do not yet name, and treat an unlisted version as unverified until your own test build passes.
ckanext-dcat repositoryPython version for the release
Source installs of CKAN require Python 3.10 or newer, so the Python in your base image must meet the minimum for the release you pin. Check the install documentation for the release, since minimums can change between versions, and confirm that every extension and its pinned dependencies install on that same interpreter. A Python version that works for your theme may still fail when an extension pulls in an older library.
Install from sourceRelease support and patch policy
CKAN targets about two minor releases a year, and the team supports the latest patch of the current minor version plus the previous minor version. Patch releases do not break backwards compatibility and exclude schema changes and new features, but minor releases may include backwards-incompatible changes. Confirm that your pinned version is still supported, and plan a patch-level bump in the image whenever a newer patch ships.
Release policyFeatures that changed between releases
Themes and extensions often depend on templates, helper functions, configuration keys or APIs that a minor release can change. Compare your custom templates, plugin interfaces and ckan.ini settings against the changelog for every minor version between your current release and your target. Ask the team that owns each extension which release notes it depends on, because a passing build does not prove that a removed helper is unused.
CKAN releasesPostgreSQL and Solr versions
CKAN's install guide lists PostgreSQL 12 or newer, Solr 9 as the recommended search version with Solr 8 also listed, and Redis. These services run outside the CKAN application image, so the versions you run in your environment must match what the pinned CKAN release expects. Confirm them before building, since a schema or database change in a newer release can require a matching Solr or PostgreSQL move.
Questions teams ask before building their own CKAN image
How much does a custom CKAN Docker image cost to build?
The cost follows from a written scope, because DeployOpen does not publish a price list. Most engagements are fixed-scope, so the quote follows from the extensions, custom code and environments agreed in writing before work starts. The main cost components are the build itself (packaging CKAN, your theme and extensions onto the base image, and setting up the registry and promotion path), compatibility work for the CKAN release you pin, and testing in each environment. Some costs are one-time, such as the first build and pipeline setup. Others recur, such as rebuilds after each CKAN patch release and extension update, and these can be covered by a retainer. Ask each quote to split build, testing, handover and recurring work so you can compare it with your own team's effort.
How long does the first custom CKAN image build take?
No fixed duration applies to every portal, so the timeline depends on the scope agreed in writing before work starts. The biggest drivers are the number of extensions, how much custom code you have, and how many of those extensions already support the CKAN version you plan to pin. Each extension that needs a fork, a patch or a new test case adds work, and so does each environment you promote through (for example, development, staging and production, as an illustrative setup). Readiness of your side matters too: access to source repositories, test data and a decision on the target CKAN version can stall a build more than the packaging itself. Ask for a timeline that lists milestones, the decisions it depends on, and what happens if a dependency slips.
What does the portal team need to provide for the build?
The portal team supplies the decisions and access that only it can provide, while the build team handles packaging and verification. In practice, that usually means:
- Source access to your theme, custom extensions and any forked code, with an owner who can answer questions about them.
- A decision on the CKAN version and extension versions to pin, with the release notes reviewed.
- Test data that resembles production datasets, resources and users, with no live personal data copied into non-production environments without approval.
- A container registry, CI runner and deployment target in environments you control, with build credentials issued for the work.
- Named reviewers for each environment who approve promotion.
Your team also stays responsible for business rules and acceptance testing, because only it knows what the portal must do.
Can an in-house team build a custom CKAN image without a partner?
Yes, an in-house team can build a custom CKAN image alone if it already has Docker, Python packaging and CKAN operations skills, and the time to keep up with releases. The work is mostly routine once the pipeline exists: extend the ckan/ckan-base image, install each extension's requirements, pin the CKAN version and promote the image through environments. The risk sits in the edges: extensions that lag behind a new CKAN release, upgrade steps with breaking changes in minor releases, and tests that only your portal's data will exercise. Check three things before deciding: whether at least two people can cover the build and the on-call rotation, whether someone owns extension compatibility, and whether a test environment exists that matches production. If any answer is no, a fixed-scope build with a handover, or a retainer, may fit the gap better.
How often does a custom CKAN image need to be rebuilt?
A custom image must be rebuilt whenever something inside it changes, and CKAN's release policy makes patch releases a regular trigger. The tech team supports the latest patch of the current minor version and the previous minor version, and an outdated patch loses support once a newer patch is out. Patch releases do not break backwards compatibility, so a rebuild on the same minor version is usually a routine test and promote cycle. Minor releases, which CKAN targets about two of each year, can include backwards-incompatible changes, so they need a planned compatibility pass before you move. Extension updates, base image changes and changes to your theme also trigger rebuilds. Plan a fixed cadence for patch rebuilds and an event-driven path for security fixes, and confirm both with your CI process. The CKAN release policy sets out the support windows you should plan around.
Which CKAN extensions break when the CKAN version changes?
No single list applies, because compatibility depends on each extension's own release notes, and you must check them against the CKAN version you pin. Some extensions publish support for specific CKAN lines. For example, ckanext-dcat states support for CKAN 2.10 and 2.11, so a pin to a newer line needs its own check before the image is built. Compatibility work usually covers:
- Confirming each extension's supported CKAN versions and its Python requirements.
- Running the extension's own tests and your portal's acceptance tests on the pinned version.
- Reviewing templates, plugins and custom code for changes in CKAN's interfaces.
- Recording the pinned version of every extension in the requirements the image installs, so builds are repeatable.
Each extension you add multiplies this work, which is the main reason the number of extensions drives cost.
Should I pin the CKAN version in my Docker image?
Yes, pin the exact CKAN version in the image so every build and environment runs the same code. An unpinned or floating tag lets a rebuild pull a different CKAN release without a review, which can change behavior between environments unnoticed. Pin the extension versions too, and record them in the requirements files that the image installs. Choose the CKAN line deliberately: patch releases are designed not to break backwards compatibility, while a move to a new minor version needs a review of its release notes because it may include backwards-incompatible changes. CKAN 2.12.0 was released on August 26, 2026, alongside maintenance releases 2.11.6 and 2.10.11, so check the CKAN releases page and confirm which line each of your extensions supports before pinning.
When does a retainer make sense for a custom CKAN image?
A retainer makes sense when the image needs regular attention that a one-time build does not cover, such as rebuilds after each patch release, extension updates, testing before promotion and occasional upgrades. DeployOpen offers retainers for ongoing support, upgrades and continuous testing, and the scope is agreed in writing like any other engagement. It is a weaker fit when the portal changes rarely, your team already owns the rebuild process, and a single handover covers what you need. Consider the recurring load too: a retainer turns unplanned interruptions into a planned schedule, which helps when staff are stretched. Ask any provider what the retainer includes, how requests are scheduled, what happens during a CKAN minor upgrade, and whether it is billed per release or per period.
How DeployOpen scopes and delivers a CKAN image build
DeployOpen treats a CKAN image build as a repeatable release process. We plan the work against your pinned CKAN version, your theme and extensions, and the environments each image must pass through, then implement and document it in your own infrastructure. Most engagements are fixed-scope, so the boundaries are agreed in writing before build work begins.
How we scope
- The written scope lists the CKAN version you pin, the base image tag, and each theme and extension to package.
- Extension requirements are inventoried, with their CKAN version compatibility checked before any Dockerfile work starts.
- Scope also names the environments, registries and promotion steps, and who approves each image moving forward.
How we build
- Images are built on the ckan/ckan-base image for the pinned version, with your theme and extensions layered on top.
- Extension requirements are installed from pinned versions so rebuilds start from the same inputs.
- Each build is tested in a pre-production environment before the same image is promoted to production.
How we hand over
- You receive the Dockerfile, build scripts, and version pinning files in your own source control.
- Runbooks cover building, tagging, promoting and rolling back an image, written for your platform team.
- Handover includes a walkthrough with your engineers, so the team can rebuild the image without us.
How we support
- Ongoing support is available as a retainer, and it can cover rebuilds when CKAN or extension versions change.
- New CKAN patches can trigger a rebuild and retest, since older patches lose support once superseded.
- Confirm before signing what response times, support hours and coverage the retainer includes in writing.

