38 lines
1.3 KiB
Docker
38 lines
1.3 KiB
Docker
FROM ckan/ckan-dev:testing-only.2.9
|
|
|
|
LABEL maintainer="brett@kowh.ai"
|
|
|
|
# Set up environment variables
|
|
ENV APP_DIR=/srv/app
|
|
ENV TZ=UTC
|
|
RUN echo ${TZ} > /etc/timezone
|
|
|
|
# Make sure both files are not exactly the same
|
|
RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
|
|
cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\
|
|
fi ;
|
|
|
|
# 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
|
|
|
|
# Clone the extension(s) your are writing for your own project in the `src` folder
|
|
# to get them mounted in this image at runtime
|
|
|
|
# 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
|
|
|
|
COPY patches ${APP_DIR}/patches
|
|
|
|
RUN for d in ${APP_DIR}/patches/*; do \
|
|
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
|