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

Use higher value for mambauser UID/GID #295

Closed
wholtz opened this issue Apr 20, 2023 · 11 comments
Closed

Use higher value for mambauser UID/GID #295

wholtz opened this issue Apr 20, 2023 · 11 comments

Comments

@wholtz
Copy link
Member

wholtz commented Apr 20, 2023

Ubuntu added a new account to the lunar release and it has UID 1000. We currently use UID 1000 for mambauser. With our current Dockerfile, the build of with ubuntu:lunar as the base image fails.

Some possible ways forward:

  1. Wait until micromamba v1.5.0 is released and at that time move mambauser to UID 10000 and add in ubuntu:lunar as a base image.
  2. Add conditional logic to setting MAMBA_USER_ID such that it remains at 1000 for existing base images and is 10000 for ubuntu:lunar based images.
@maresb
Copy link
Collaborator

maresb commented Apr 20, 2023

Perhaps we could do both: add conditional logic for ubuntu:lunar now and then change the default to 10000:10000 on the next minor release?

@wholtz
Copy link
Member Author

wholtz commented Jul 17, 2023

Done in #344 #345 using conditional logic for lunar. I decided to use 57439 for the new uid/gid instead of 10000 in order to reduce the likelihood that we end up with another uid collision in the future. When micromamba v1.5.0 releases, I'd still like to get all our images using the the same UID and GID for mambauser. I will work on getting this change on the dev branch so it is ready to go.

@maresb
Copy link
Collaborator

maresb commented Jul 17, 2023

Sounds great! Although 57439 is perhaps a bit extreme. I wonder if we should set environment variables so people writing Dockefiles don't have to remember.

@wholtz
Copy link
Member Author

wholtz commented Jul 18, 2023

On most modern unix system, UID/GID are unsigned 32-bit integers. So I felt I wasn't going too crazy with my value. The real reason for my choice is that alpine only uses an unsigned 16-bit integer.

Yes, setting an environmental variable is a good idea.

@wholtz wholtz changed the title ubuntu:lunar uses UID 1000 and this conflicts with mambauser UID Use higher. value for mambauser UID/GID Jul 18, 2023
@wholtz wholtz changed the title Use higher. value for mambauser UID/GID Use higher value for mambauser UID/GID Jul 18, 2023
@luabida
Copy link

luabida commented Jul 18, 2023

I'm also facing this issue. I'm not sure if it's a Kubuntu standard, but my user also has 1000:1000 uid and gid. For now I'm changing my id, but it may turn to be an issue to more users in the future.

@wholtz
Copy link
Member Author

wholtz commented Jul 18, 2023

@luabida - can you please tell me more about what you are doing when you run into this conflict. Are you using our Dockerfile to add micromamba to a kubuntu image? Or are you directly making use of one of our published images?

@luabida
Copy link

luabida commented Jul 18, 2023

@wholtz of course, here is the Dockerfile. I'm using the rootless container approach to create the container user

In my shell:

id $USER
uid=1000(bida) gid=1000(bida) groups=1000(bida)

@maresb
Copy link
Collaborator

maresb commented Aug 24, 2023

@wholtz, is this happening now that 1.5.0 is out?

@wholtz
Copy link
Member Author

wholtz commented Aug 24, 2023

Yes, the 1.5.0 images are building right now and they are all using 57439 for UID/GID. I also added environmental variables for those values as you requested.

@maresb
Copy link
Collaborator

maresb commented Aug 24, 2023

That's amazing, thank you!!!

@wholtz
Copy link
Member Author

wholtz commented Aug 24, 2023

Done in 8491dcc

@wholtz wholtz closed this as completed Aug 24, 2023
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

No branches or pull requests

3 participants