docker-ckan/ckan/Dockerfile

39 lines
1.4 KiB
Docker
Raw Normal View History

2020-09-29 12:34:56 +02:00
FROM ckan/ckan-base:testing-only.2.9
2020-09-17 11:42:27 +02:00
LABEL maintainer="brett@kowh.ai"
2021-05-13 08:34:14 +02:00
# Set up environment variables
ENV APP_DIR=/srv/app
2021-05-11 14:22:25 +02:00
ENV TZ=UTC
2021-05-12 16:25:03 +02:00
RUN echo ${TZ} > /etc/timezone
2021-05-11 14:25:39 +02:00
# Make sure both files are not exactly the same
2021-05-11 13:57:34 +02:00
RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
2021-05-11 14:08:32 +02:00
cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\
fi ;
2020-09-17 11:42:27 +02:00
# Install any extensions needed by your CKAN instance
# (Make sure to add the plugins to CKAN__PLUGINS in the .env file)
# For instance:
#RUN pip install -e git+https://github.com/ckan/ckanext-pages.git#egg=ckanext-pages && \
# pip install -e git+https://github.com/ckan/ckanext-dcat.git@v0.0.6#egg=ckanext-dcat && \
# pip install -r https://raw.githubusercontent.com/ckan/ckanext-dcat/v0.0.6/requirements.txt
# Install the extension(s) you wrote for your own project
# RUN pip install -e git+https://github.com/your-org/ckanext-your-extension.git@v1.0.0#egg=ckanext-your-extension
# Apply any patches needed to CKAN core or any of the built extensions (not the
# runtime mounted ones)
# See https://github.com/okfn/docker-ckan#applying-patches
2021-05-13 10:58:33 +02:00
2021-05-13 16:38:14 +02:00
COPY patches ${APP_DIR}/patches
2020-09-17 11:42:27 +02:00
2021-05-13 08:34:14 +02:00
RUN for d in ${APP_DIR}/patches/*; do \
2020-09-17 11:42:27 +02:00
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; patch -p1 < "$f" ; \
done ; \
fi ; \
done