Skip to content

Files generated within the docker container should belong to the host user #2284

Open
@demestav

Description

@demestav

Description

In docker development in Linux (and Mac?) when a file is generated in the docker container, it belongs to the root user. Since the project directory is a volume to the host machine directory, those files belong to the root user in the host as well. If you want to edit those files, you need to become root or change the permissions. It would be nice to not have to deal with this.

Examples of iles that are generated by the application:

  • migrations
  • media
  • translations

This does not only apply to editing the files; sometimes permissions cause problems when rebuilding an image.

Rationale

Removing the need to deal with permissions will improve the development workflow

Suggestion

Without being an expert on the subject, I deal with this problem by assigning user 1000 to the container. However, I think this does not generalize since not all users will have the id 1000. Also I am not sure if this conflicts with #1410

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions