cachix / devenv

Fast, Declarative, Reproducible, and Composable Developer Environments
https://devenv.sh
Apache License 2.0
4.42k stars 331 forks source link

devenv container <name> --docker-run sometimes fails (doesn't cause an image to be put into the local docker-daemon) #957

Closed mcdonc closed 9 months ago

mcdonc commented 9 months ago

The symptom is that in certain configurations (yet unknown), skopeo fails to copy the container from the Nix json to the local docker-daemon registry upon devenv container <name> --docker-run with a "too many levels of symbolic links" kind of error under skopeo 1.14.1 and a silent failure under skopeo 1.13.X

I filed these upstream reports:

https://github.com/nlewo/nix2container/issues/112

https://github.com/containers/skopeo/issues/2204

mcdonc commented 9 months ago

:sob: : This turned out to be because I had a directory named "nix" as a subdir of my devenv project. Any devenv project with a "nix" subdir will have the same issue.

I've created the minimal possible reproduction case at https://github.com/mcdonc/devenv-nix2container-bugrepro

Its readme demonstrates how to reproduce the problem.

mcdonc commented 9 months ago

As I think about this, I suppose it makes sense. It's trying to overlay "/nix" on the container image. :sob:

mcdonc commented 9 months ago

This will be fixed by https://github.com/cachix/devenv/pull/963