nix: make docker work!!
This commit is contained in:
parent
b31a7511e1
commit
b1d988671c
1 changed files with 7 additions and 8 deletions
15
flake.nix
15
flake.nix
|
@ -15,20 +15,19 @@
|
||||||
name = "plapkit";
|
name = "plapkit";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
vendorHash = "sha256-YY7Hj7lSq7vEoMEIu/zmweWzd7p7KF+4YCUX2SJ7kwI=";
|
vendorHash = "sha256-YY7Hj7lSq7vEoMEIu/zmweWzd7p7KF+4YCUX2SJ7kwI=";
|
||||||
|
|
||||||
nativeBuildInputs = [pkgs.musl];
|
|
||||||
ldflags = [
|
|
||||||
# "-s -w"
|
|
||||||
"-linkmode external"
|
|
||||||
"-extldflags '-static -L${pkgs.musl}/lib'"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.container = pkgs.dockerTools.buildImage {
|
packages.container = pkgs.dockerTools.buildImage {
|
||||||
|
# fromImage = baseImage;
|
||||||
name = "noe/plapkit";
|
name = "noe/plapkit";
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
|
copyToRoot = pkgs.buildEnv {
|
||||||
|
name = "image-root";
|
||||||
|
paths = [ packages.default ];
|
||||||
|
pathsToLink = [ "/bin" ];
|
||||||
|
};
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${packages.default}" ];
|
Cmd = [ "/bin/plapkit" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue