Initial commit

This commit is contained in:
Quentin 2022-07-24 14:41:15 +02:00
commit d54fd744b8
Signed by: quentin
GPG Key ID: E9602264D639FF68
3 changed files with 37 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
result

17
README.md Normal file
View File

@ -0,0 +1,17 @@
# A lightweight Nix environment in a docker container
This container is inteded to be used in a CI environment,
and especially with Drone CI.
Build with:
```
docker load < $(nix-build)
```
## Notes
Drone CI hardcodes the shell with `/bin/sh`,
so whatever the change you make to the container,
you must ensure that `/bin/sh` exists and works.

19
default.nix Normal file
View File

@ -0,0 +1,19 @@
let
pkgsSrc = fetchTarball {
# As of 2022-07-19
url = "https://github.com/NixOS/nixpkgs/archive/d2db10786f27619d5519b12b03fb10dc8ca95e59.tar.gz";
sha256 = "0s9gigs3ylnq5b94rfcmxvrmmr3kzhs497gksajf638d5bv7zcl5";
};
pkgs = import pkgsSrc { };
in
pkgs.dockerTools.buildImage {
name = "superboum/nixtainer";
copyToRoot = pkgs.buildEnv {
name = "image-root";
pathsToLink = [ "/bin" ];
paths = [
pkgs.nixStatic
pkgs.pkgsStatic.busybox
];
};
}