Skip to content

Error when chowning workdir hosts with selinux enabled #2

@chbrandt

Description

@chbrandt

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions