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

universal image error: "mount: /tmp: permission denied" #126

Closed
tomatebeans opened this issue Sep 22, 2022 · 3 comments
Closed

universal image error: "mount: /tmp: permission denied" #126

tomatebeans opened this issue Sep 22, 2022 · 3 comments
Assignees

Comments

@tomatebeans
Copy link

tomatebeans commented Sep 22, 2022

Tried to use the universal image inside .devcontainer but got the error.
image

Then I tried to run the universal image independently but I still get the error: mount: /tmp: permission denied.

Sample of the command I tried: docker run -it --rm mcr.microsoft.com/vscode/devcontainers/universal bash

image

seems error is addressed by --privileged but maybe not the solution

go image does not have the same error:
image

edit: seems weird that there is /home/codespace instead of /home/vscode

root ➜ / $ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:101:101:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
messagebus:x:104:105::/nonexistent:/usr/sbin/nologin
codespace:x:1000:1000::/home/codespace:/bin/bash                  <------------------------------------
sshd:x:105:65534::/run/sshd:/usr/sbin/nologin
root ➜ / $ ls /home
codespace                                  <------------------------------------
root ➜ / $
@samruddhikhandale samruddhikhandale self-assigned this Sep 23, 2022
@samruddhikhandale
Copy link
Member

Hi @tomatebeans,

seems error is addressed by --privileged but maybe not the solution

The universal image uses docker-in-docker , hence, it needs the --privileged flag to run.
Context - https://docs.docker.com/engine/reference/commandline/run/#full-container-capabilities---privileged

go image does not have the same error:

Yes, you are right because the go image does not use docker-in-docker 😄

edit: seems weird that there is /home/codespace instead of /home/vscode

The universal image is used by default by GitHub Codespaces, that's the reason for having /home/codespace- https://github.com/devcontainers/images/tree/main/src/universal#description

Hope this answers all your questions.

@samruddhikhandale
Copy link
Member

✨ Also, a suggestion to switch to use images with path mcr.microsoft.com/devcontainers/*

ℹ️ As we're starting to migrate contents of microsoft/vscode-dev-containers repo to the devcontainers org, as part of the work on the open dev container specification.

We'll are publishing images from devcontainers/images with path mcr.microsoft.com/devcontainers/*. Images with path mcr.microsoft.com/vscode/devcontainers/* will still be published from the new repo for backwards compatibility, but it will be nice if you could adapt to it now. 😄

For more details, you can review the announcement issue

@tomatebeans
Copy link
Author

Awesome. Thanks very much for the explanations.

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