3 ms·
> These glitches come from the strange way in which Docker deals with permissions and security. Contrary that what you mean read, it is not a simple matter of s
by darkteflon 6y ago
> These glitches come from the strange way in which Docker deals with permissions and security. Contrary that what you mean read, it is not a simple matter of setting user and group identifiers: it may be sufficient on some systems but not on systems supporting Security-Enhanced Linux which require additional care.
Does anyone have any general advice on the best way to deal with Docker file permissions issues on recent Ubuntu LTS distros? As a new Docker user this has proven surprisingly intractable. As mentioned in the quoted text, simply setting UID / GUID to the same doesn’t seem to do the trick most of the time. I see podman has been mentioned in this thread but is there a native, no-dependency, no-new-tool way to handle this? I feel like I must be missing something simple. Grateful to hear anyone’s experience.
- zarkov99 6y agoI do not use SEL, but on regular Ubuntu the below works perfectly with respect to permissions: #!/bin/bash docker run \ --rm \ --net host \ -i \ -v /etc/passwd:/etc/passwd \ -v /etc/group:/etc/group \ -v /usr/local/share/fonts:/usr/local/share/fonts \ -v /usr/share/fonts:/usr/share/fonts \ -v /run/user/:/run/user/ \ -v /tmp:/tmp \ -v /home:/home \ -u $UID \ -e DISPLAY=$DISPLAY \ -t container \ /bin/bash