cachix / devenv

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

How to exclude source repo from container #1420

Open chitter99 opened 1 week ago

chitter99 commented 1 week ago

How can I create a container that doesn't include the source repo. According to the documentation I should use copyToRoot = null;, but this is no longer allowed (see https://github.com/cachix/devenv/issues/1265). What is the recommended approach now?

chitter99 commented 1 week ago

Tried with copyToRoot = [ ];, worked almost as it build the container. But coudn't exec into the container due to the home directory missing.

✦ ❯ docker run -it example
mkdir: cannot create directory '/env/.devenv': Permission denied
ln: failed to create symbolic link '/env/.devenv/profile': No such file or directory
ln: failed to create symbolic link '/env/.devenv/run': No such file or directory
chitter99 commented 1 week ago

Fixed the issue related to missing home https://github.com/cachix/devenv/pull/1422