keitaroinc/docker-ckan
关于
CKAN docker images, docker-compose and examples
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Dockerized CKAN
This repository contains base docker images and docker-compose used to build and run CKAN.
We build and publish docker images built using this repository to Dockerhub:
and Github Container Registry:
Looking to run CKAN on Kubernetes? Check out our CKAN Helm Chart!
Overview
CKAN Docker images for CKAN supported releases based on Alpine Linux.
The Docker base images provided here contain base CKAN and the extensions: ckanext-envvars and ckanext-xloader. The docker images are built using a multi-stage docker approach in order to produce slim production grade docker images with the right libraries and configuration.
Directory layout:
- compose - contains a docker-compose setup allowing users to spin up a CKAN setup easily using docker-compose
- images - includes docker contexts for building all supported CKAN versions
Running CKAN using docker-compose
To start CKAN using docker-compose, simply change into the compose directory and run
docker compose build
docker compose up -d
Check if CKAN was succesfuly started on http://localhost:5000.
Extending CKAN docker images
The docker images contain uv and we recommend using when extending the images with additional CKAN and python packages. Example:
############
### MAIN ###
############
FROM ghcr.io/keitaroinc/ckan:2.12.0
# CKAN extension source code URLs
ENV ACME_GIT_URL="https://github.com/myghorg/ckanext-acme.git"
ENV ACME_GIT_VERSION="0.4.2"
ENV ACME_REQUIREMENTS_URL="https://raw.githubusercontent.com/myghorg/ckanext-acme/refs/tags/${ACME_GIT_VERSION}/requirements.txt"
# Add the custom extensions to the plugins list
ENV CKAN__PLUGINS envvars image_view text_view recline_view datastore datapusher acme
# Switch to the root user
USER root
# Install and enable the custom extensions
# Install necessary system packages with apk
RUN apk add --no-cache libffi-dev && \
# Install the CKAN extension and any requirements using uv
uv pip install --system git+${ACME_GIT_URL}@${ACME_GIT_VERSION} && \
uv pip install --system git+${ACME_GIT_URL}@${ACME_GIT_VERSION} && \
uv pip install --system -r ${ACME_REQUIREMENTS_URL} && \
# Install any other required python packages
uv pip install --system requests && \
# Update plugin configuration
ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
chown -R ckan:ckan /srv/app && \
# Remove uv cache
rm -rf /app/cache
# Switch to the ckan user
USER ckan
Adding init and afterinit scripts
You can add scripts to CKAN custom images and copy them to the docker-entrypoint.d directory. Any *.sh or *.py file in that directory will be executed before the main initialization script (prerun.py) is executed.
You can add scripts to CKAN custom images and copy them to the docker-afterinit.d directory. Any *.sh or *.py file in that directory will be executed after the main initialization script (prerun.py) is executed.
Build
To build a CKAN image run:
docker build --tag ghcr.io/keitaroinc/ckan:2.12.0 images/ckan/2.12
The –-tag ghcr.io/keitaroinc/ckan:2.12.0 flag sets the image name to ghcr.io/keitaroinc/ckan:2.12.0 and 'images/ckan/2.12' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are.
探索相关项目
加载中…