Bonitasoft-Community / docker_bonita

:whale: Source of the official Bonita Docker image
https://hub.docker.com/_/bonita/
17 stars 16 forks source link

Remove VOLUME instruction from Dockerfile #11

Open DasWolke opened 6 years ago

DasWolke commented 6 years ago

The Bonita Dockerfile has a VOLUME declaration which is not overwritable ( https://github.com/moby/moby/issues/3465 )

Because there is no way to remove or unset a volume when extending an image, this basically prevents me from being able to create an image pre-loaded with custom configuration and already set to run as the bonita user. Using the VOLUME instruction doesn't seem to have any benefits at all apart from bugging people that want to extend the image, since you still have to use -v to explicitly declare the volume.

Can you please remove the volume mount declaration from the base image?

tnguyen1 commented 5 years ago

Hi @DasWolke,

Sorry for the very very late reply. Your report makes sense and we are currently evaluating proper actions to handle this VOLUME instruction removal. Indeed, our main concern is to avoid storing living data in the container’s writable layer (such as logs or configuration files). Hence making sure these data are stored in a volume.

Meanwhile, I can suggest using the bonita image's custom-init.d extension point as documented here: https://github.com/docker-library/docs/tree/master/bonita#how-to-extend-this-image Basically you may extend the bonita image adding any necessary files in your child's image Dockerfile. Then at runtime, a custom-init.d script could copy those files to the /opt/bonita directory.

:information_source: Further information and custom-init.d script examples can be found on this documentation too: https://documentation.bonitasoft.com/bcd/3.0/custom_init#toc3

We will update this issue when the VOLUME instruction gets removed.

Best regards.