This commit is contained in:
parent
b158df262e
commit
09a5df6253
2 changed files with 27 additions and 2 deletions
|
@ -3,11 +3,35 @@
|
|||
pkgs_linux ? import <nixpkgs> { system = "x86_64-linux"; },
|
||||
}:
|
||||
|
||||
pkgs.dockerTools.buildImage {
|
||||
with pkgs;
|
||||
dockerTools.buildImage {
|
||||
name = "default";
|
||||
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 = {
|
||||
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