All Projects → keitaroinc → docker-ckan

keitaroinc / docker-ckan

Licence: Apache-2.0 license
CKAN docker images, docker-compose and examples

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects
HTML
75241 projects
Makefile
30231 projects

Projects that are alternatives of or similar to docker-ckan

Ckan
CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers catalog.data.gov, open.canada.ca/data, data.humdata.org among many other sites.
Stars: ✭ 3,223 (+6906.52%)
Mutual labels:  open-data, ckan
datos.gob.es
Código perteneciente al portal español de Datos Abiertos datos.gob.es.
Stars: ✭ 20 (-56.52%)
Mutual labels:  open-data, ckan
odufrn-downloader
Pacote para baixar os dados do portal de dados abertos da UFRN
Stars: ✭ 31 (-32.61%)
Mutual labels:  open-data, ckan
opendata
Finland national open data portal (avoindata.fi) source code.
Stars: ✭ 27 (-41.3%)
Mutual labels:  open-data, ckan
content-api-scala-client
A Scala client library for the Guardian's Content API
Stars: ✭ 37 (-19.57%)
Mutual labels:  open-data
api-catalog
API Catalog for Suomi.fi Data Exchange Layer
Stars: ✭ 15 (-67.39%)
Mutual labels:  ckan
osd-building-footprints
Open source release of building footprints in Chicago.
Stars: ✭ 61 (+32.61%)
Mutual labels:  open-data
dre
O projecto agora reside no GitLab
Stars: ✭ 20 (-56.52%)
Mutual labels:  open-data
ckanext-ldap
A CKAN extension that provides LDAP authentication.
Stars: ✭ 31 (-32.61%)
Mutual labels:  ckan
us-house
117th United States House of Representatives - Contact Information, including: Phone Number, Mailing Address, Official Website, Twitter & Facebook Accounts.
Stars: ✭ 31 (-32.61%)
Mutual labels:  open-data
311
New web portal for BOS:311
Stars: ✭ 15 (-67.39%)
Mutual labels:  open-data
YALC
🕸 YALC: Yet Another LOD Cloud (registry of Linked Open Datasets).
Stars: ✭ 14 (-69.57%)
Mutual labels:  open-data
visualization-tool
The tool for visualizing Swiss Open Government Data. Project ownership: Federal Office for the Environment FOEN
Stars: ✭ 20 (-56.52%)
Mutual labels:  open-data
opendata
Open data of Cofacts collaborative fact-checking database
Stars: ✭ 35 (-23.91%)
Mutual labels:  open-data
erfrischungskarte-frontend
Interactive map of Berlin that shows 🕶 shade areas, 💨 wind and 🌡 temperature intensities across the day
Stars: ✭ 18 (-60.87%)
Mutual labels:  open-data
CSV2RDF
Streaming, transforming, SPARQL-based CSV to RDF converter. Apache license.
Stars: ✭ 48 (+4.35%)
Mutual labels:  open-data
velos-paris
Synthèse des compteurs de vélos à Paris
Stars: ✭ 14 (-69.57%)
Mutual labels:  open-data
osmand map creation
OSM data + open address data compiled for use in OSMAnd
Stars: ✭ 22 (-52.17%)
Mutual labels:  open-data
publicbodies
A database of public bodies such as government departments, ministries etc.
Stars: ✭ 56 (+21.74%)
Mutual labels:  open-data
transitland-atlas
an open directory of mobility feeds and operators — powers both Transitland v1 and v2
Stars: ✭ 55 (+19.57%)
Mutual labels:  open-data

Dockerized CKAN

build-status License Docker Pulls Chat on Gitter

This repository contains base docker images, examples 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

Images are provided in two flavors:

The Docker containers include only the required extensions to start a CKAN instance. 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. This multi-stage approach allows us to build python binary wheels in the build stages that later on we install in the main stage.

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 and datapusher
  • examples - includes examples on how to extend the CKAN docker images and how to run them

Running CKAN using docker-compose

To start CKAN using docker-compose, simply change into the compose directory and run

cd compose/2.9
docker-compose build
docker-compose up

Check if CKAN was succesfuly started on http://localhost:5000.

Configuration

In order to configure CKAN within docker-compose we use both build/up time variables loaded via the .env file, and runtime variables loaded via the .ckan-env file.

Variables in the .env file are loaded when running docker-compose build and docker-compose up, while variables in .ckan-env file are used withing the CKAN container at runtime to configure CKAN and CKAN extensions using ckanext-envvars.

Extending CKAN docker images

Check some examples of extending CKAN docker images in the examples directory.

We recommend to use a multi-stage approach to extend the docker images that we provide here. To extend the images the following Dockerfile structure is recommended:

###################
### Extensions ####
###################
FROM ghcr.io/keitaroinc/ckan:2.9.5 as extbuild

# Switch to the root user
USER root

# Install any system packages necessary to build extensions
# Make sure we install python 3.8, cause CKAN is not compatible with 3.9
RUN apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/v3.13/main \
        python3-dev=3.8.10-r0 

# Fetch and build the custom CKAN extensions
RUN pip wheel --wheel-dir=/wheels git+https://github.com/acmecorp/[email protected]#egg=ckanext-acme

############
### MAIN ###
############
FROM ghcr.io/keitaroinc/ckan:2.9.5

# 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

COPY --from=extbuild /wheels /srv/app/ext_wheels

# Install and enable the custom extensions
RUN pip install --no-index --find-links=/srv/app/ext_wheels ckanext-acme && \
    ckan config-tool ${APP_DIR}/production.ini "ckan.plugins = ${CKAN__PLUGINS}" && \
    chown -R ckan:ckan /srv/app

# Remove wheels
RUN rm -rf /srv/app/ext_wheels

# 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.9.5 images/ckan/2.9

The –-tag ghcr.io/keitaroinc/ckan:2.9.5 flag sets the image name to ghcr.io/keitaroinc/ckan:2.9.5 and 'images/ckan/2.9' at the end tells docker build to use the context into the specified directory where the Dockerfile and related contents are.

Upload to DockerHub

It's recommended to upload built images to DockerHub

To upload the image to DockerHub run:

docker push [options] <docker-hub-namespace>/ckan:<image-tag> 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].