Add step to copy init files
Always copy the files in /docker-entrypoint.d automatically, otherwise users need to explicitly add a `COPY` step in the `ckan/Dockerfile`, which is confusing
This commit is contained in:
parent
8cf41a2ee2
commit
f9ebc0c41c
@ -5,6 +5,10 @@ ENV APP_DIR=/srv/app
|
|||||||
ENV TZ=UTC
|
ENV TZ=UTC
|
||||||
RUN echo ${TZ} > /etc/timezone
|
RUN echo ${TZ} > /etc/timezone
|
||||||
|
|
||||||
|
|
||||||
|
# Copy custom initialization scripts
|
||||||
|
COPY docker-entrypoint.d/* /docker-entrypoint.d/
|
||||||
|
|
||||||
# Make sure both files are not exactly the same
|
# Make sure both files are not exactly the same
|
||||||
RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
|
RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
|
||||||
cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\
|
cp /usr/share/zoneinfo/${TZ} /etc/localtime ;\
|
||||||
|
|||||||
@ -44,9 +44,11 @@ RUN if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then \
|
|||||||
# Clone the extension(s) your are writing for your own project in the `src` folder
|
# Clone the extension(s) your are writing for your own project in the `src` folder
|
||||||
# to get them mounted in this image at runtime
|
# to get them mounted in this image at runtime
|
||||||
|
|
||||||
|
# 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
|
# Apply any patches needed to CKAN core or any of the built extensions (not the
|
||||||
# runtime mounted ones)
|
# runtime mounted ones)
|
||||||
|
|
||||||
COPY patches ${APP_DIR}/patches
|
COPY patches ${APP_DIR}/patches
|
||||||
|
|
||||||
RUN for d in $APP_DIR/patches/*; do \
|
RUN for d in $APP_DIR/patches/*; do \
|
||||||
|
|||||||
4
ckan/docker-entrypoint.d/README.md
Normal file
4
ckan/docker-entrypoint.d/README.md
Normal file
@ -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.
|
||||||
Loading…
x
Reference in New Issue
Block a user