Skip to content

Unmentioned problem accessing volumes as a non-root user #2724

@TheYarin

Description

@TheYarin

I was having problems with the python Dockerfile template for running under a non-root user.
When mounting a volume to the container, that is pointing, say, on a folder, it's the host that is managing this folder's permissions, and thus, the internal appuser might not have access to it by default.

In the end, I managed to grant access to the folder on my linux host by specifying the user id inside the dockerfile when creating appuser, and granting permission using setfacl.

Here's a relevant snippet of my final version of the dockerfile:
image

This is very unintuitive, and should probably be mentioned somewhere, maybe to this page but I think this should be better emphasized in the dockerfile itself, since I didn't even think of opening the link that appeared in the dockerfile template at first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions