redo docker image and build it in ci

This commit is contained in:
Charles Hall 2024-01-18 13:31:46 -08:00
parent 02781e4f9b
commit 4de54db305
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 33 additions and 132 deletions

View file

@ -95,6 +95,26 @@
meta.mainProgram = cargoToml.package.name;
};
packages.oci-image =
let
package = self.packages.${system}.default;
in
pkgs.dockerTools.buildImage {
name = package.pname;
tag = "latest";
config = {
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT) are
# handled as expected
Entrypoint = [
"${pkgs.lib.getExe' pkgs.tini "tini"}"
"--"
];
Cmd = [
"${pkgs.lib.getExe package}"
];
};
};
devShells.default = (pkgs.mkShell.override { inherit stdenv; }) {
env = env // {
# Rust Analyzer needs to be able to find the path to default crate