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

shell/processes container fails to create /run #1182

Closed
tmplt opened this issue May 2, 2024 · 2 comments · Fixed by #1232
Closed

shell/processes container fails to create /run #1182

tmplt opened this issue May 2, 2024 · 2 comments · Fixed by #1232
Labels
bug Something isn't working containers Related to running containers with devenv

Comments

@tmplt
Copy link

tmplt commented May 2, 2024

Describe the bug
When running a shell container /run fails to be created due to permission errors.

To reproduce

$ cd $(mktemp -d) && devenv init && devenv inputs add nix2container github:nlewo/nix2container --follows nixpkgs && devenv inputs add mk-shell-bin github:rrbutani/nix-mk-shell-bin && devenv container run shell   
• Creating devenv.nix                                                                                                             
• Creating devenv.yaml                                                                                                           
• Creating .envrc                                                                                                                 
• Creating .gitignore                                                                                                             
• Building shell container ...                                                                                                    
• Using Cachix: devenv                                                                                                           
 /nix/store/ni6nahk940piyp3hwgjvhby8r76hp48n-image-shell.json                                                                      
✔ Building shell container in 5.2s.                                                                                               
• Running /nix/store/vpphrbqh2ailvjngf26f5cmv0rfjp67a-copy-container /nix/store/ni6nahk940piyp3hwgjvhby8r76hp48n-image-shell.json docker-daemon:                                                                                                                                                                                                                                                      
Copying container /nix/store/ni6nahk940piyp3hwgjvhby8r76hp48n-image-shell.json to docker-daemon:shell:latest                                                                                                                                                        
Getting image source signatures                                                                                                  
Copying blob c5f0738141c5 done   |                                                                                                
Copying blob 7e244f96af9b done   |                                                                                                
Copying config d727e8dcc1 done   |                                                                                                
Writing manifest to image destination                                                                                             
✔ Copying shell container in 6.4s.                                                                                                
✨ devenv 1.0.5 is newer than devenv input in devenv.lock. Run `devenv update` to sync.                                            
hello from devenv                                                                                                                 
git version 2.44.0                                                                                                                
mkdir: cannot create directory '/run': Permission denied                                                                          
bash-5.2$ ls /
bin  dev  env  etc  nix  proc  sys  tmp

Version

devenv 1.0.5; not using the flake wrapper. Installed via nix profile install nixpkgs#devenv.

@tmplt tmplt added the bug Something isn't working label May 2, 2024
@tmplt
Copy link
Author

tmplt commented May 2, 2024

This breaks process containers: enabling the ping example.com process and in the same directory:

$ devenv container run processes
[snip]

mkdir: cannot create directory '/run': Permission denied                                                                          
{"level":"warn","error":"open /env/.config/process-compose/settings.yaml: no such file or directory","time":"2024-05-02T11:13:36Z","message":"Error reading settings file /env/.config/process-compose/settings.yaml"}                                              
24-05-02 11:13:36.170 FTL start UDS http server on /run/user/1000/devenv-9ae3d14/pc.sock failed error="listen unix /run/user/1000/devenv-9ae3d14/pc.sock: bind: no such file or directory"                                                                          
✔ Running processes container in 1.2s.
$ echo $?
0 

@tmplt tmplt changed the title shell container fails to create /run shell/processes container fails to create /run May 2, 2024
@tmplt tmplt changed the title shell/processes container fails to create /run shell/processes container fails to create /run May 2, 2024
@tmplt
Copy link
Author

tmplt commented May 2, 2024

Can repro on NixOS and NixOS-WSL.

@sandydoo sandydoo added the containers Related to running containers with devenv label May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working containers Related to running containers with devenv
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants