This commit is contained in:
parent
b158df262e
commit
09a5df6253
2 changed files with 27 additions and 2 deletions
|
@ -59,6 +59,7 @@ jobs:
|
||||||
- name: Push image
|
- name: Push image
|
||||||
run: >-
|
run: >-
|
||||||
podman push
|
podman push
|
||||||
|
--auth-file=${XDG_RUNTIME_DIR}/containers/auth.json&
|
||||||
--creds="${{ forge.actor }}:${{ forge.token }}"
|
--creds="${{ forge.actor }}:${{ forge.token }}"
|
||||||
localhost/default:latest
|
localhost/default:latest
|
||||||
${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
|
${{ env.registry }}/${{ env.owner }}/${{ env.image }}:${{ env.tag }}
|
|
@ -3,11 +3,35 @@
|
||||||
pkgs_linux ? import <nixpkgs> { system = "x86_64-linux"; },
|
pkgs_linux ? import <nixpkgs> { system = "x86_64-linux"; },
|
||||||
}:
|
}:
|
||||||
|
|
||||||
pkgs.dockerTools.buildImage {
|
with pkgs;
|
||||||
|
dockerTools.buildImage {
|
||||||
name = "default";
|
name = "default";
|
||||||
tag = "latest";
|
tag = "latest";
|
||||||
|
|
||||||
|
contents = [
|
||||||
|
coreutils
|
||||||
|
u-root-cmds
|
||||||
|
bash
|
||||||
|
nix
|
||||||
|
nodejs
|
||||||
|
podman
|
||||||
|
];
|
||||||
|
|
||||||
|
runAsRoot = ''
|
||||||
|
#!${stdenv.shell}
|
||||||
|
${dockerTools.shadowSetup}
|
||||||
|
groupadd -r runner
|
||||||
|
useradd -r -g runner -d /data -M runner
|
||||||
|
mkdir /data
|
||||||
|
chown runner:runner /data
|
||||||
|
'';
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
Cmd = [ "${pkgs_linux.hello}/bin/hello" ];
|
# User = "root";
|
||||||
|
Cmd = [ "${lib.getExe bashInteractive}" ];
|
||||||
|
WorkingDir = "/data";
|
||||||
|
Volumes = {
|
||||||
|
"/data" = {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue