aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-06-02 17:16:17 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-06-02 17:16:17 +0200
commite09001d6f405f059f11ad2fbfac96e8e72577542 (patch)
tree6fda4f237048e157e49d19f89ebbb82faed4c611
parent24fed41288531bf3bf69657eaf3287ff545d0254 (diff)
downloadaerogramme-e09001d6f405f059f11ad2fbfac96e8e72577542.tar.gz
aerogramme-e09001d6f405f059f11ad2fbfac96e8e72577542.zip
better docker imagesalbatros
-rw-r--r--flake.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 3bf91b2..cf77bc0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -114,6 +114,17 @@
'';
};
+ binroot = pkgs.stdenv.mkDerivation {
+ pname = "aerogramme-bin";
+ version = "0.0.1";
+ dontUnpack = true;
+ dontBuild = true;
+ installPhase = ''
+ mkdir -p $out
+ cp ${(rustRelease.workspace.aerogramme {}).bin}/bin/aerogramme $out/
+ '';
+ };
+
# docker packaging
archMap = {
"x86_64-unknown-linux-musl" = {
@@ -129,8 +140,9 @@
container = pkgs.dockerTools.buildImage {
name = "dxflrs/aerogramme";
architecture = (builtins.getAttr targetHost archMap).GOARCH;
+ copyToRoot = binroot;
config = {
- Cmd = [ "${bin}" ];
+ Cmd = [ "/aerogramme" "server" ];
};
};