Skip to content

Commit

Permalink
Run dnixd in the docker shim
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Sep 13, 2024
1 parent 982b859 commit d62a02a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
13 changes: 12 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,10 @@ class NixInstallerAction extends DetSysAction {
dir: "/tmp",
readOnly: false,
},
{
dir: "/usr",
readOnly: true,
},
{
dir: "/nix",
readOnly: false,
Expand All @@ -759,6 +763,14 @@ class NixInstallerAction extends DetSysAction {
}
}

const plausibleDeterminateOptions = [];
const plausibleDeterminateArguments = [];
if (this.determinate) {
plausibleDeterminateOptions.push("--entrypoint");
plausibleDeterminateOptions.push("/usr/local/bin/determinate-nixd");
plausibleDeterminateArguments.push("daemon");
}

this.recordEvent(EVENT_START_DOCKER_SHIM);
const exitCode = await actionsExec.exec(
"docker",
Expand All @@ -776,8 +788,10 @@ class NixInstallerAction extends DetSysAction {
"--name",
`determinate-nix-shim-${this.getUniqueId()}-${randomUUID()}`,
]
.concat(plausibleDeterminateOptions)
.concat(mountArguments)
.concat(["determinate-nix-shim:latest"]),
.concat(["determinate-nix-shim:latest"])
.concat(plausibleDeterminateArguments),
{
silent: true,
listeners: {
Expand Down

0 comments on commit d62a02a

Please sign in to comment.