docker-ckan/ckan/Dockerfile.ghcr

41 lines
1.3 KiB
Docker
Raw Normal View History

FROM ghcr.io/mjanez/ckan-spatial:ckan-2.9.9
2023-09-28 13:36:09 +02:00
LABEL maintainer="mnl.janez@gmail.com"
2023-04-20 13:20:33 +02:00
# Set up environment variables
ENV APP_DIR=/srv/app
ENV TZ=UTC
2023-09-28 13:36:09 +02:00
# Set working directory
WORKDIR ${APP_DIR}
2023-04-20 13:20:33 +02:00
# Make sure both files are not exactly the same
2023-09-28 13:36:09 +02:00
RUN echo ${TZ} > /etc/timezone && \
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
cp /usr/share/zoneinfo/${TZ} /etc/localtime ; \
2023-04-20 13:20:33 +02:00
fi ;
# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
2023-09-28 13:36:09 +02:00
COPY docker-entrypoint.d/* docker-entrypoint.d/
2023-04-20 13:20:33 +02:00
# Update who.ini with PROXY_CKAN_LOCATION
2023-09-28 13:36:09 +02:00
COPY setup/who.ini ./
2023-04-20 13:20:33 +02:00
# Apply any patches needed to CKAN core
2023-10-02 09:30:24 +02:00
COPY patches ./
2023-04-20 13:20:33 +02:00
# Updated version of the Dockerfile RUN command that skips applying a patch if a reversed or previously applied patch is detected
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"` && \
if patch -R --dry-run -p1 < "$f"; then \
echo "$0: Patch $f has already been applied or reversed, skipping..."; \
else \
echo "$0: Applying patch $f to $SRC_DIR/`basename $d`"; \
patch -p1 < "$f" ; \
fi \
done ; \
fi ; \
done
2023-09-28 13:36:09 +02:00
CMD ["/bin/sh", "-c", "$APP_DIR/start_ckan.sh"]