Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After running in act, host's nix-daemon is unusable #65

Closed
Hoverbear opened this issue Jan 9, 2024 · 3 comments · Fixed by #67
Closed

After running in act, host's nix-daemon is unusable #65

Hoverbear opened this issue Jan 9, 2024 · 3 comments · Fixed by #67

Comments

@Hoverbear
Copy link
Contributor

Hoverbear commented Jan 9, 2024

It appears that after #59 the action runs something like the following inside of the runner:

docker
          --log-level=debug
          run
          --detach
          --privileged
          --userns=host
          --pid=host
          --mount
          type=bind,src=/tmp,dst=/tmp
          --mount
          type=bind,src=/nix,dst=/nix
          --mount
          type=bind,src=/etc,dst=/etc,readonly
          --restart
          always
          --init
          --name
          determinate-nix-shim-${this.correlation}
          determinate-nix-shim:latest

I am not sure it was intended, but in the case of docker-in-docker systems (like act) this appears to mount the /nix of the docker host.

In act, is the the user's host machine.

This creates the rather unfortunate situation where the host's Nix is unavailable after running the action:

image

@grahamc
Copy link
Member

grahamc commented Jan 9, 2024 via email

@Hoverbear
Copy link
Contributor Author

Ahh perhaps that is what is happening!

@Hoverbear
Copy link
Contributor Author

It does appear to be using a socket mount: https://github.com/nektos/act/blob/adbe229fcb34d8747297f824a8b465b01be3437a/pkg/runner/run_context.go#L1035

I guess we need to see if we can detect if it's true docker-in-docker or this socket-mount solution.

detsys-pr-bot pushed a commit to detsys-pr-bot/nix-installer-action that referenced this issue Oct 10, 2024
…m DeterminateSystems/dependabot/npm_and_yarn/npm_and_yarn-cc3f4627d0` (`18dff575ee06557065bdbc22c099c05606a4285c`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants