forked from ckan/ckan-docker
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from ckan/init-improvements
Init stage improvements
- Loading branch information
Showing
3 changed files
with
30 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
FROM ckan/ckan-base:2.10.1 | ||
|
||
# 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 | ||
# See Dockerfile.dev for more details and examples | ||
|
||
# Copy custom initialization scripts | ||
COPY docker-entrypoint.d/* /docker-entrypoint.d/ | ||
|
||
# Apply any patches needed to CKAN core or any of the built extensions (not the | ||
# runtime mounted ones) | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Use scripts in this folder to run extra initialization steps in your custom CKAN images. | ||
Any file with `.sh` or `.py` extension will be executed just after the main initialization | ||
script (`prerun.py`) is executed and just before the web server and supervisor processes are | ||
started. |