2024-04-21 22:28:35 +00:00
|
|
|
{ inputs
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
, dockerTools
|
|
|
|
, lib
|
|
|
|
, main
|
|
|
|
, stdenv
|
|
|
|
, tini
|
|
|
|
}:
|
|
|
|
|
|
|
|
dockerTools.buildLayeredImage {
|
|
|
|
name = main.pname;
|
|
|
|
tag = "main";
|
|
|
|
created = "@${toString inputs.self.lastModified}";
|
|
|
|
contents = [
|
|
|
|
dockerTools.caCertificates
|
|
|
|
];
|
|
|
|
config = {
|
2024-10-25 01:29:17 +00:00
|
|
|
Entrypoint = if !stdenv.hostPlatform.isDarwin
|
2024-04-21 22:28:35 +00:00
|
|
|
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT)
|
|
|
|
# are handled as expected
|
|
|
|
then [ "${lib.getExe' tini "tini"}" "--" ]
|
|
|
|
else [];
|
|
|
|
Cmd = [
|
|
|
|
"${lib.getExe main}"
|
|
|
|
];
|
2024-11-02 17:12:14 +00:00
|
|
|
Env = [
|
|
|
|
"RUST_BACKTRACE=full"
|
|
|
|
];
|
2024-04-21 22:28:35 +00:00
|
|
|
};
|
|
|
|
}
|