diff options
| author | Christine Dodrill <me@christine.website> | 2021-01-01 16:24:41 -0500 |
|---|---|---|
| committer | Christine Dodrill <me@christine.website> | 2021-01-01 16:25:45 -0500 |
| commit | 9c5250d10a3ea877b6c939448c4b63649257079f (patch) | |
| tree | e7c314e632955ab7fd9eebe9b4eec8fcff0d2e1f /docker.nix | |
| parent | 474fd908bca7ce2ae5e584351790d2394fce6ff2 (diff) | |
| download | xesite-9c5250d10a3ea877b6c939448c4b63649257079f.tar.xz xesite-9c5250d10a3ea877b6c939448c4b63649257079f.zip | |
make this compatible with the new nix way of doing things
Signed-off-by: Christine Dodrill <me@christine.website>
Diffstat (limited to 'docker.nix')
| -rw-r--r-- | docker.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docker.nix b/docker.nix new file mode 100644 index 0000000..866cfe5 --- /dev/null +++ b/docker.nix @@ -0,0 +1,23 @@ +{ system ? builtins.currentSystem }: + +let + sources = import ./nix/sources.nix; + pkgs = import sources.nixpkgs { inherit system; }; + callPackage = pkgs.lib.callPackageWith pkgs; + site = callPackage ./site.nix { }; + + dockerImage = pkg: + pkgs.dockerTools.buildLayeredImage { + name = "xena/christinewebsite"; + tag = "latest"; + + contents = [ pkgs.cacert pkg ]; + + config = { + Cmd = [ "${pkg}/bin/xesite" ]; + Env = [ "CONFIG_FNAME=${pkg}/config.dhall" "RUST_LOG=info" ]; + WorkingDir = "/"; + }; + }; + +in dockerImage site |
