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

Error when chowning workdir hosts with selinux enabled #2

Open
chbrandt opened this issue Dec 11, 2018 · 0 comments
Open

Error when chowning workdir hosts with selinux enabled #2

chbrandt opened this issue Dec 11, 2018 · 0 comments
Assignees

Comments

@chbrandt
Copy link
Member

chbrandt commented Dec 11, 2018

Issue found in a Fedora host.

One of the steps we do in entrypoint.sh is the adjustment of permissions for the user running inside the container. If DOCKER_UID is not set, we will use a default 1000.

Clearly, the user inside the container may not be the same instantiating the container from the host system. When that happens, the host system will complain ("permission denied") and the container will crash.

While the crash is undesirable, the mechanism in place is effectively to handle such situations -- i.e, when we need/want to set a likewise identity inside the container.

To work around the issue, pass the variable DOCKER_UID when instantiating the/a container. Suppose you are using the chbrandt/swift_deepsky -- a container that uses docker_commons:

$ docker run -it     -e DOCKER_UID=$UID     -v $PWD/work:/work chbrandt/swift_deepsky
@chbrandt chbrandt self-assigned this Dec 11, 2018
@chbrandt chbrandt added the bug label Dec 11, 2018
@chbrandt chbrandt removed the bug label Feb 18, 2019
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

1 participant