Skip to content

Set $HOME in container #2968

@shykes

Description

@shykes

Currently the docker runtime always sets $HOME to /. We could offer conveniences to detect a more relevant value based on the current user.

One way is to parse /etc/passwd and look for the home directory corresponding to the current user. We already parse it when a user is configured with run -u, so why not?

Another way is to extend the WORKDIR build directive (which specifies which directory to execute the process in), and have it set $HOME to that value. We could rename that directive to "HOME" to make that more obvious.

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