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

Configurable user IDs #429

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

etcwilde
Copy link
Contributor

When working with these containers to debug issues locally, it's sometimes useful to have the source directory live on the host, while building in the container. In order for permissions to line up, the user ID numbers need to match or the build-user may not be able to create the necessary directories.

This patch allows setting the build-user user ID so that the permissions line up and the user in the container and host can manipulate the files.

Override the build user ID with the current user's ID is done with the following command to ensure that the permissions on any volumes are kept in sync is the following:
docker build --build-arg BUILD_USER_ID=$(id -u) ...

When working with these containers to debug issues locally, it's
sometimes useful to have the source directory live on the host, while
building in the container. In order for permissions to line up, the user
ID numbers need to match or the build-user may not be able to create
the necessary directories.

This patch allows setting the build-user user ID so that the permissions
line up and the user in the container and host can manipulate the files.

Override the build user ID with the current user's ID is done with the
following command to ensure that the permissions on any volumes are
kept in sync is the following:
`docker build --build-arg BUILD_USER_ID=$(id -u) ...`
@etcwilde etcwilde requested a review from shahmishal as a code owner November 11, 2024 23:13
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

Successfully merging this pull request may close these issues.

2 participants