New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setfacl not persisted during Docker build #40553
Comments
I can reproduce your problem. I do have a (kind of dirty) workaround. Because For example, create
and run it during build in your Dockerfile:
Does this work fo you? |
Yes, this workaround is applicable to my situation, thank you! I wonder if there is a good place to add this information to, or if this issue is enough for potential future people running into the same problem. |
Unfortunately I have no idea. Ask and answer a Stackoverflow question? |
Actually, there some information about in the Docker documentation: |
…ith an entrypoint but keep container running! moby/moby#40553 (comment)
…ash script and execute it after startup. We add /usr/bin/env bash at the end to ensure that the container keeps running. See moby/moby#40553
Description
I am building an image based on ubuntu and as a part of the build process I am setting up access rules via
setfacl
. However, when I run a container based on the resulting image, everything reported bygetfacl
is just the default - as if I never ransetfacl
before.The command itself works, because
setfacl && getfacl
on the same file does actually show the ACL changes.This pseudo-Dockerfile illustrates this case:
The build output corresponding to that Dockerfile is:
As you can see, as long as the
getfacl
command is executed inside the sameRUN
statement assetfacl
, it works as expected.Describe the results you received:
setfacl
is not persisted outside of aRUN
Dockerfile statementDescribe the results you expected:
setfacl
should be persisted. If not possible, this should be explicitly stated in a documentation or the command should fail altogether.Additional information you deem important (e.g. issue happens only occasionally):
I found two StackOverflow questions (here and here), but there is no authoritative answer there, just speculation.
I could not find anything else relating to this anywhere else.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
MacOS Mojave
The text was updated successfully, but these errors were encountered: