Skip to content

Custom docker daemon args is not working #10844

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
shaoye opened this issue Jun 22, 2022 · 4 comments
Closed

Custom docker daemon args is not working #10844

shaoye opened this issue Jun 22, 2022 · 4 comments
Assignees
Labels
component: ws-daemon type: bug Something isn't working

Comments

@shaoye
Copy link
Contributor

shaoye commented Jun 22, 2022

Bug description

Got Permission denied error following the steps in #8435

1. Add environment variable DOCKER_DAEMON_ARGS to your user settings. The content should look like this:
{ "remap-user": "1000" } (Means container id 1000 will be mapped to gitpod user).
2. Start workspace
3. mkdir /workspace/tmp/me
4. Run docker image which supports running as unprivileged user e.g. sudo docker run -it -u node -v /workspace/tmp/me:/tmp node sh
5. Create file within container e.g. touch /tmp/foo
6. Verify that the created file has gitpod:gitpod permissions in the workspace

got permission denied at step 5,

touch: cannot touch '/tmp/foo': Permission denied

the node user can't create any files since /tmp is owned by gitpod user

/tmp$ ls -al
total 4
drwxr-xr-x 2 33333 33333   40 Jun 21 21:59 .
drwxr-xr-x 1 root  root  4096 Jun 21 22:00 ..

Steps to reproduce

as above

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

@kylos101
Copy link
Contributor

Internal Slack thread for context

@utam0k utam0k self-assigned this Jul 4, 2022
@utam0k utam0k moved this from Scheduled to Blocked in 🌌 Workspace Team Jul 4, 2022
@utam0k utam0k moved this from Blocked to In Progress in 🌌 Workspace Team Jul 4, 2022
@utam0k
Copy link
Contributor

utam0k commented Jul 4, 2022

Hi, @shaoye. I investigated this issue and found the name of the env was wrong.
You set DOCKER_DAEMON_ARGS, but DOCKERD_ARGS is the right name.
https://www.gitpod.io/docs/environment-variables#user-specific-environment-variables

However, the name of the environment variable in the PR summary was incorrect. I have corrected that as well. Thanks.
image

@utam0k utam0k closed this as completed Jul 4, 2022
Repository owner moved this from In Progress to Done in 🌌 Workspace Team Jul 4, 2022
@YoungElPaso
Copy link

Can confirm this works - super useful!

@utam0k
Copy link
Contributor

utam0k commented Mar 23, 2023

@YoungElPaso cc: @kylos101
I'm glad to hear that ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ws-daemon type: bug Something isn't working
Projects
No open projects
Archived in project
Development

No branches or pull requests

4 participants