Skip to content

Improve documentation on non-root container usage#194

Merged
umputun merged 1 commit intoumputun:masterfrom
paskal:paskal/docker-user-improvements
Mar 16, 2025
Merged

Improve documentation on non-root container usage#194
umputun merged 1 commit intoumputun:masterfrom
paskal:paskal/docker-user-improvements

Conversation

@paskal
Copy link
Contributor

@paskal paskal commented May 25, 2024

Also, switch the base image to the latest, as there is no point in pinpointing it, and remove the unused, deprecated golangci.yml setting.

@paskal paskal requested a review from umputun as a code owner May 25, 2024 10:32
README.md Outdated

There is nothing except reproxy binary inside the reproxy container, as it builds on top of an empty (scratch) image.

### How to set up non-root user with docker access and use it with reproxy container
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is too much instruction for the task, which is not really related to the Reproxy itself but rather to the general question "how do I map host uid/gid to container". It is also not a universal recipe, as it won't work on some flavors of Linux (Alpine, for example) and it's not sure if it will work on macOS.

In addition, I think this is not the only way to run the Reproxy container under a non-root account. It is possible to map the uid/gid from any existing user to app inside the container.

My suggestion is to leave only the part describing what user already exists in the container and add a general statement like "you may need to set up uid/gid mapping at the Docker level and ensure the user has permission to access the Docker socket, in case the Docker provider is used". A link to the Docker documentation explaining uid mapping would also be helpful.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a better suggestion, extend that section with an explanation on how to map the existing UID/GID without adding a new user to the host machine. One of our other projects may have a similar solution already, though I can't recall which one. Additionally, the details after the basic information on existing UID/GID should be collapsed by default, as users who need this information likely already know how to achieve the mapping, while the rest of the users may not understand the purpose of these details.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the current version.

@paskal paskal marked this pull request as draft September 27, 2024 21:45
@paskal paskal marked this pull request as ready for review March 16, 2025 17:51
Copy link
Owner

@umputun umputun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@umputun umputun merged commit b616e1b into umputun:master Mar 16, 2025
3 checks passed
@paskal paskal deleted the paskal/docker-user-improvements branch March 16, 2025 18:01
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