I was attempting to use your wonderful image in my k8s deployment by mounting my custom startup script directly under /assets/custom-scripts/ from a configMap resource. I had been careful to ensure my file was mounted as executable using defaultMode. Unfortunately, startup fails due the chmod command which attempts to modify the file which in a read-only file system:
I would argue that it should be the user's responsibility to ensure scripts are executable and not the startup script. The chmod command assumes the file system is writable, which forces a much more complex deployment approach.
I was attempting to use your wonderful image in my k8s deployment by mounting my custom startup script directly under
/assets/custom-scripts/
from aconfigMap
resource. I had been careful to ensure my file was mounted as executable usingdefaultMode
. Unfortunately, startup fails due thechmod
command which attempts to modify the file which in a read-only file system:https://github.com/tiredofit/docker-openldap/blob/cc7c325a6fcff2907ae919d2e241145b3cbce237/install/assets/functions/10-openldap#L551-L559
I would argue that it should be the user's responsibility to ensure scripts are executable and not the startup script. The
chmod
command assumes the file system is writable, which forces a much more complex deployment approach.