Comment on Rootless docker and symlink to docker.sock security issues
groet@feddit.org 1 day ago
- is there a reason you don’t use podman instead of rootless docker?
- can you run patchmon inside of docker and mount the socket to the original path inside of the container?
- the symlink has the file permissions of the file it points to. If the socket is owned by a user, so will the symlink, even if you used root/sudo to create the link. (technically the symlink will be owned by root, but the permissions on a symlink are ignored and the permission of the target are used)
- as long as you don’t change any permissions on
/var/runor on thedocker.sockto be more permissive than they are now, there is functionally no difference in security 4.5) If you or someone else on the system tries to run docker with a different user/root, the symlink will likely cause issues
Thanks for the answer.
groet@feddit.org 13 hours ago
Podman is pretty mutch a drop in replacement for docker but it runs in user context instead if root.
All docker commands work with podman by just replacing the name including podman compose.
(You do have to specify docker.io as a repository if you want to pull images from docker hub but that is literally the only difference In usage I ever noticed)