Skip to content

How to add gitpod user to a supplementary group #780

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

Closed
gjsjohnmurray opened this issue Sep 9, 2019 · 2 comments
Closed

How to add gitpod user to a supplementary group #780

gjsjohnmurray opened this issue Sep 9, 2019 · 2 comments
Assignees

Comments

@gjsjohnmurray
Copy link

I'm trying to gitpodify an image from Docker Hub. I made some progress, but when my workspace started up the gitpod user wasn't able to run some of the commands packaged in the image. I suspect I need to add the gitpod user to a specific group that's defined in the image.

I tried this in my dockerfile:

USER root
RUN useradd gitpod
RUN usermod -a -G gitpod irisusr

During workspace startup those commands seemed to succeed, but at step 9/12 I got this failure:

Error while adding Gitpod layer.Step 9/12

Error: Error while adding Gitpod layer.

Without my useradd and usermod there was no problem at step 9 and everything started up. But the gitpod user didn't belong to the required group, so the app environment doesn't work.

Please advise.

@geropl
Copy link
Member

geropl commented Sep 10, 2019

Hi @gjsjohnmurray,

the lines we use to setup the gitpod user are:

addgroup --gid 33333 gitpod
useradd --no-log-init --create-home --home-dir /home/gitpod --shell /bin/bash --uid 33333 --gid 33333 gitpod

Does that work for you?

Also, can you share more about your setup? We very rarely see people take this path and are always interested in feedback and learning more about the usecases. We experienced that existing docker images were often tied to a very specific usecase and would not fit for Gitpod/as dev environment.
Thanks!

@gjsjohnmurray
Copy link
Author

@svenefftinge thanks for that info. Elsewhere I'm now trying to overcome the base image's default need for root access. I'll come back if there's more to share here. Closing this issue now.

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

2 participants