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
full nixos inside docker #3779
full nixos inside docker #3779
Conversation
Sometimes extra arguments when making tarball are required, for example if making a container owner of files has to be changed to root.
You can try it here: https://registry.hub.docker.com/u/offlinehacker/nixos/ |
Works perfectly, even on ubuntu+nix by installing docker from nixpkgs master. I suggest to use /init instead of /bin/init to not have init in PATH. |
+1, I think this would be a nice way for new people to try out NixOS as well. |
Can you please make console-getty optional based on boot.isContainer, or
|
Is "enable = boot.isContainer;" enough? |
enable = mkDefault config.boot.isContainer maybe |
I think this should be enough, at least it Works for normal services.
|
This is first attempt to run full nixos inside docker. You will need docker 1.2.0(already meged into master), because of support of adding capabilities to containers. Currenty it should not be possible to run these images on docker virtualization providers, because docker was, but does not have patch for systemd included anymore, because of (for my opinion) not so relevant non systemd related bugs(see: docker-archive/libcontainer#30 and moby/moby#3629).
As soon as docker will be patched to have cgroups mounted, i will make it run without these additional flags.
UPDATE: I still have to figure out how to push new base image to docker image repos