tiredofit / docker-openldap

Dockerized LDAP server with many customizable options
MIT License
110 stars 48 forks source link

chmod for custom scripts fails on read-only file systems #31

Closed goldsam closed 4 years ago

goldsam commented 4 years ago

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:

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.

tiredofit commented 4 years ago

I agree with this. I should not dictating this - It's up to to the user. Thanks for catching this - this has been around forever!

tiredofit commented 4 years ago

Tagged as 7.1.7

goldsam commented 4 years ago

Awesome! Great project. Thanks for your hard work 😉