Skip to content
This repository has been archived by the owner on Dec 29, 2021. It is now read-only.
/ nix-docker-nix Public archive

An attept to a fully configured Nix environment in a Docker image.

Notifications You must be signed in to change notification settings

garbas/nix-docker-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix-Docker-Nix

An attempt to fully configure Docker image with a ready-to-use Nix environment.

Work in this repository is exploratory and once work is done it should be merged upstream. In order to push things upstream we should build docker images with `dockerTools` functions in `nixpkgs`.

Prior work

This work would not be possible without prior efforts:

Goals

Goals are listed in order of importance.

1. Easy to try out Nix in a Docker container

Currently installation story is not perfect. A lot of potential users are feeling overwhelmed by the amount of installation steps and options. While options are always good to have, having to much of them at first only confuses potential users.

At the same time we also must admit that Docker is some sort of industry standard. For this project we can assume that most potential users will have basic Docker knowledge. (I’m aware this are not all of our potential users, this project does not try to make it work for everybody.)

Tasks:

  • [ ] Build a Docker image with Nix and configure Nix to be running without sandbox mode.

    This would allow potential users to get Nix environment by typing:

    $ docker run -ti nixos/nix:latest
        
  • [ ] Test Nix installation on each commit to Nix repository.

    https://github.com/grahamc/nix-install-matrix/tree/refactored-hacks

  • [ ] Build a Docker image with Nix and configure Nix to be running with enabled sandbox mode.

    This would allow potential users to get Nix environment by typing:

    $ docker run -ti --privileged nixos/nix-sandbox:latest
        

    Default user is root and builds are performed without nix-daemon.

  • [ ] Build a Docker image with Nix and configure Nix to be running with enabled multiuser mode.

    This would allow potential users to get Nix environment by typing:

    $ docker run -ti --privileged nixos/nix-multiuser:latest
    or
    $ docker run -ti --privileged nixos/nix-daemon:latest
        

    Default user is app and builds are performed via nix-daemon.

2. Companies using Docker and Nix should be able to extend on this work

3. Improve documentation and messaging how and why to build Docker images with Nix

Want to help? Need help?

Look at currently open issues and get engaged. Looking for help? Open an issue.

https://github.com/nix-community/nix-docker-nix/issues

About

An attept to a fully configured Nix environment in a Docker image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published