Skip to content
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

Support for Docker Rootless mode #116

Open
andzno1 opened this issue Apr 9, 2024 · 2 comments
Open

Support for Docker Rootless mode #116

andzno1 opened this issue Apr 9, 2024 · 2 comments

Comments

@andzno1
Copy link

andzno1 commented Apr 9, 2024

Currently the container does not work in Rootless mode, since the container relies on file permissions for different users (www-data, mysql). Running in Rootless mode will set the owner for all mounted files and directories to root inside the container if the mounted files on the host are owned by the user running the docker container.

When changing the owner on the host to e.g. www-data, the files inside the container will be owned by nobody:nogroup, since the files on the host are not owned by the user running the docker container.

Is there a chance to make the container work in Rootless mode?

@Mirppc
Copy link

Mirppc commented Jun 1, 2024

This also is an issue for those who use podman instead of docker. Something as simple as ports will not work at all since port 80 is a privileged port.
For Example:

podman run --name=ampache -d -v /totaly/not/porn/music:/media:ro -p 80:80 ampache/ampache

will error out with

Failed to bind port 80 (Permission denied) for option '-t 80-80:80-80', exiting

Doing the command

podman run --name=ampache -d -v /totaly/not/porn/music:/media:ro -p 8086:80 ampache/ampach
will make podman not complain but the interface is not accessible in a web browser

It seems this is a rootless issue from what i could find. So the issue the original poster posted is a bit wider than just a rootless docker.

@lachlan-00
Copy link
Member

for the port i could just allow it on the container. i'm sure i've set something before where i allowed a low port for my user (been a while though)

for rootless they run as your UID? how do you determine that or do you just chmod 777 everything to allow it to run as your user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants