LnL7 / nix-docker

Docker images for the Nix package manager
MIT License
288 stars 41 forks source link

nix 2.0? #14

Closed Mic92 closed 6 years ago

Mic92 commented 6 years ago

This could need an update.

LnL7 commented 6 years ago

I ran into some kind of problem with nix-env, didn't look into it any further yet.

building '/nix/store/gn4yxdxzzw6qvmrwfbbd1ql6bv3prsmv-user-environment.drv'...
while setting up the build environment: executing '/nix/store/lg0s7z1bvj2chimz3a4qax3y8ssw45m3-nix-2.0/libexec/nix/buildenv': Permission denied
builder for '/nix/store/gn4yxdxzzw6qvmrwfbbd1ql6bv3prsmv-user-environment.drv' failed with exit code 1
error: build of '/nix/store/gn4yxdxzzw6qvmrwfbbd1ql6bv3prsmv-user-environment.drv' failed
LnL7 commented 6 years ago

This looks pretty suspicious to me, but I'm not sure where to go from there.

[pid 13227] seccomp(SECCOMP_SET_MODE_STRICT, 1, NULL) = -1 EINVAL (Invalid argument)

https://gist.github.com/LnL7/e6b613f4016a60c3c478d4c078af8212#file-gistfile1-txt-L27

Mic92 commented 6 years ago

@LnL7 do you have branch for, I could try this? I am pretty familiar with linux os sandboxing internals.

LnL7 commented 6 years ago

nix-wip or do you want an image?

Mic92 commented 6 years ago

that should be ok.

Mic92 commented 6 years ago

@LnL7 do your run docker on nixos? Do you have any non-standard options?

Mic92 commented 6 years ago

Or does your error happen during docker build?

Mic92 commented 6 years ago

Dockerfiles are also working for me.

Mic92 commented 6 years ago

Ah, no. Now I can reproduce it.

Mic92 commented 6 years ago

Let's get swifty: https://github.com/Mic92/cntr :)

Mic92 commented 6 years ago

I first guessed it was a special syscall filter being applied during docker build. But I get the same error when using cntr, so it must be something else. I will digger deeper.

Mic92 commented 6 years ago

That seccomp error is not the actual problem.

LnL7 commented 6 years ago

Thanks for the help with debugging!