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

Ensure the crate user in the Docker image belongs to a group #156

Merged
merged 9 commits into from
Jun 24, 2024

Conversation

martinburchell
Copy link
Collaborator

When we create the Docker image, a crate user is created with the same ID as the current user ID on the host. This allows file permissions to be set correctly on mounted file systems shared between the container and the host, but only if they are owned by that user. If there is a shared file system that is group read/write but created by another user in the group then the current user will not be able to access it from Docker.

This change creates a crate group in the Docker image and adds the crate user to that group. The ID of this group is specified by the CRATE_DOCKER_INSTALL_GROUP_ID environment variable. The installer sets this variable by looking at the groups the user belongs to (excluding os-generated groups). If there is only one group, the installer will use that. Otherwise it prompts the user to select a group ID from a list.

In the future it might be useful to create multiple groups in the Docker image but let's leave it simple for now.

Includes some security fixes: requests, Tornado, urllib3

@martinburchell martinburchell merged commit 8fca559 into master Jun 24, 2024
2 checks passed
@martinburchell martinburchell deleted the docker-user-has-group branch June 24, 2024 08:49
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