-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
run nix in a non root container in openshift - restricted SCC #10747
Comments
Triaged in Nix maintainers meeting:
|
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2024-05-22-nix-team-meeting-minutes-147/45835/1 |
@bessalahAmar Please trying building Nix |
Hi @Ericson2314 , @fricklerhandwerk , thanks for taking a look at this. if you have the build on a tarball i can test it in the openshift sandbox. error:
|
Hi @Ericson2314 , @fricklerhandwerk , i was able to test the master version ( through the the image : nixos/nix:master ) and it's working :) thanks for your prompt resolution |
Describe the bug
i'm trying to deploy nix in openshift under the restricted scc.
it looks like the nix is using unshare which can't work with non root user
As i'm using restricted SCC we can't add capabilities to the pod.
From the doc I have the impression that root permission is only needed for creating the nix folder but apprently no
Also tried to disable sandboxing but same result :
Bellow my attempts
Single user installation :
Multi user installation
Steps To Reproduce
RUN useradd --create-home appuser -u 1010130000 -g 0
RUN usermod -a -G root appuser
RUN mkdir /nix
RUN chown appuser /nix
RUN mkdir -p /etc/nix
RUN echo "build-users-group = root\nsandbox = false" > /etc/nix/nix.conf
USER appuser
RUN curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
Expected behavior
have this command work properly:
nix run --option sandbox false nixpkgs#htop --extra-experimental-features nix-command --extra-experimental-features flakes
nix-env --version
outputnix-env (Nix) 2.22.1
The text was updated successfully, but these errors were encountered: