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

Adapt feelpp user id to $UID given bu --user #5

Closed
prudhomm opened this issue Oct 12, 2017 · 2 comments
Closed

Adapt feelpp user id to $UID given bu --user #5

prudhomm opened this issue Oct 12, 2017 · 2 comments
Assignees

Comments

@prudhomm
Copy link
Member

We need to solve the userid issue on our docker images
see https://medium.com/@mccode/understanding-how-uid-and-gid-work-in-docker-containers-c37a01d01cf

@prudhomm prudhomm self-assigned this Oct 12, 2017
@gdolle
Copy link
Contributor

gdolle commented Oct 20, 2017

a7253b8 seems not to solve the problem.
It changes the uid to 9001 not the user one.
Using the option docker run -it --rm --user $UID:$GID feelpp/feelpp-toolboxes rises a priviledge error when performing useradd in the container. (atlas)

hared/:/feel feelpp/feelpp-toolboxes 
Starting with UID : 9001
useradd: Permission denied.
useradd: cannot lock /etc/passwd; try again later.
/usr/local/bin/start.sh: line 7: /etc/sudoers: Permission denied
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
chown: invalid user: 'user.user'

@gdolle gdolle reopened this Oct 20, 2017
@gdolle
Copy link
Contributor

gdolle commented Oct 27, 2017

It's ok. The command is the following

docker run --rm -it -h feelpp  -e LOCAL_USER_ID=`id -u $USER` -v ${HOME}/feel:/feel feelpp/feelpp-toolboxes

NB: The link to the doc also
https://denibertovic.com/posts/handling-permissions-with-docker-volumes/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants