feat(xanthous/server): Add derivation for docker image
This appears to work pretty nicely! Change-Id: Icf52f58225ee2837b30ba6187ae3ba3c539de9df Reviewed-on: https://cl.tvl.fyi/c/depot/+/3810 Reviewed-by: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
f9f5b0b199
commit
77f0d62a2c
2 changed files with 26 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
{ depot ? import ../../../.. {}
|
||||
args@{
|
||||
depot ? import ../../../.. {}
|
||||
, pkgs ? depot.third_party.nixpkgs
|
||||
, ...
|
||||
}:
|
||||
|
@ -7,4 +8,7 @@ depot.third_party.naersk.buildPackage {
|
|||
name = "xanthous-server";
|
||||
version = "0.0.1";
|
||||
src = depot.third_party.gitignoreSource ./.;
|
||||
passthru = {
|
||||
docker = import ./docker.nix args;
|
||||
};
|
||||
}
|
||||
|
|
21
users/grfn/xanthous/server/docker.nix
Normal file
21
users/grfn/xanthous/server/docker.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ depot ? import ../../../.. {}
|
||||
, pkgs ? depot.third_party.nixpkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (depot.users.grfn) xanthous;
|
||||
xanthous-server = xanthous.server;
|
||||
|
||||
in pkgs.dockerTools.buildLayeredImage {
|
||||
name = "xanthous-server";
|
||||
tag = "latest";
|
||||
contents = [ xanthous xanthous-server ];
|
||||
config = {
|
||||
Cmd = [
|
||||
"${xanthous-server}/bin/xanthous-server"
|
||||
"--xanthous-binary-path" "${xanthous}/bin/xanthous"
|
||||
];
|
||||
};
|
||||
ci = false;
|
||||
}
|
Loading…
Reference in a new issue