The setfacl command explicitly entered in the Dockerfile in the section e.g. CMD will not cause the ACLs to be set during the build; there are two effective methods to set the ACL on the container:
- Starting the container, entering the console and issuing the setfacl … command, the ACL permissions granted in this way work, but when committing the container and running the committed image, these permissions are gone (commit does not keep them).
- Defining a script in the Dockerfile in the ENTRYPOINT section, e.g. run.sh. In this script, we force the script to run, e.g. sh which grants permissions - this solution works as expected but has a major flaw; if the directory in which permissions are to be granted at startup has a lot of files (200,000) then permissions are granted 15 minutes. instead of 15 seconds, because that’s how long it should normally take.
How can speed up this process ?
With regards !