A really common scenario when building custom images for your project is that you'll need to initialize things in the database for an extension, or basically perform a task that needs to be done at run time, not build time.
Right now if you needed to this you would need to override the entry script in CMD to use a custom one in the ckan image. This means a lot of duplication, as you need to basically copy start_ckan.sh and start_ckan_development.sh to add a call to your custom script (eg prerun_validation.py to initialize some extension tables in the database). A better approach would be to support custom scripts in an entrypoint folder, similarly to what the postgres image offers (see How to extend this image). We could execute any *.sh or *.py file present in the folder, sorted by name like the Postgres image does.
A really common scenario when building custom images for your project is that you'll need to initialize things in the database for an extension, or basically perform a task that needs to be done at run time, not build time.
Right now if you needed to this you would need to override the entry script in
CMD
to use a custom one in theckan
image. This means a lot of duplication, as you need to basically copystart_ckan.sh
andstart_ckan_development.sh
to add a call to your custom script (egprerun_validation.py
to initialize some extension tables in the database). A better approach would be to support custom scripts in an entrypoint folder, similarly to what the postgres image offers (see How to extend this image). We could execute any*.sh
or*.py
file present in the folder, sorted by name like the Postgres image does.