Add gitea runner image

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-09-14 17:25:42 +01:00
parent cf69da4a54
commit 38b9a3162a
9 changed files with 87 additions and 19 deletions

View File

@@ -0,0 +1,37 @@
{ pkgs, ... }:
let
containerPolicy = pkgs.writeTextDir "/etc/containers/policy.json" (
builtins.readFile (
(pkgs.formats.json { }).generate "policy.json" {
default = [ { type = "insecureAcceptAnything"; } ];
transports.docker-daemon."" = [ { type = "insecureAcceptAnything"; } ];
}
)
);
in
pkgs.dockerTools.buildImage {
name = "gitea-act-runner-worker";
fromImage = pkgs.docker-image-base;
copyToRoot = pkgs.buildEnv {
name = "root";
paths = with pkgs; [
git
curl
jq
nix
nodejs
buildah
skopeo
containerPolicy
];
pathsToLink = [
"/bin"
"/etc"
];
};
runAsRoot = ''
mkdir -p /var/tmp
'';
}