Skip to content

Commit

Permalink
Add container image
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Jan 16, 2025
1 parent b465647 commit a41ceca
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 21 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
};

outputs = {
self,
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system: let
Expand Down Expand Up @@ -52,7 +52,7 @@
RUSTFLAGS = "-D unused-crate-dependencies";
};

packages = {
packages = rec {
default = rustPlatform.buildRustPackage {
pname = name;
version = version;
Expand All @@ -63,6 +63,25 @@
nativeBuildInputs = nativeBuildInputs;
buildInputs = buildInputs;
};

container-image = pkgs.dockerTools.buildImage {
name = name;
tag = "latest";
created = "now";

runAsRoot = ''
#!${pkgs.runtimeShell}
mkdir -p /config
mkdir -p /data
'';

config = {
Entrypoint = ["${default}/bin/git-collage"];
Env = [
"SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
];
};
};
};
}
);
Expand Down

0 comments on commit a41ceca

Please sign in to comment.