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

Set UID and GID of container user at runtime #55

Closed
osrf-migration opened this issue Oct 11, 2018 · 3 comments
Closed

Set UID and GID of container user at runtime #55

osrf-migration opened this issue Oct 11, 2018 · 3 comments
Labels
bug Something isn't working major
Milestone

Comments

@osrf-migration
Copy link

Original report (archived issue) by Michael McCarrin (Bitbucket: m1chaelm).


Currently the Docker image builds with the user "developer" and a UID and GID that matches the person building it. This causes at least two problems:

  1. It breaks the automatic build process, since there is no user in the autobuild environment that it can match the UID to.
  2. It causes undesirable behavior in cases where the person running the image has a different UID from the person who built it. (See discussion here and here

This problem is widely acknowledged and a fix has been requested but not yet implemented. In the meantime, many workarounds have been proposed. One of the most thorough of these is fixuid, which solves the problem by checking for UID and GID mismatches in a script set to the container entrypoint, then adjusting the internet user's UID and GID to match if necessary, and also scanning the file system to make the necessary file ownership changes.

Although not ideal, this is seems like the best available solution until there is official support for something better.

@osrf-migration
Copy link
Author

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


@M1chaelM, is this issue solved with pull request #53?

@osrf-migration
Copy link
Author

Original comment by Michael McCarrin (Bitbucket: m1chaelm).


Yes! Thanks for noticing this.

@osrf-migration
Copy link
Author

Original comment by Michael McCarrin (Bitbucket: m1chaelm).


  • changed state from "new" to "resolved"

Build and run scripts have been edited to use the "fixuid" solution for runtime adjustment of UID/GID and related file ownership issues.

@osrf-migration osrf-migration added major bug Something isn't working labels May 4, 2020
@osrf-migration osrf-migration added this to the 0.3 milestone May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant