nix
nix copied to clipboard
The nixos/nix docker image on dockerhub fails if you follow the directions on dockerhub
Describe the bug
Try to build this Dockerfile:
FROM nixos/nix
RUN nix-channel --update
As described here: https://hub.docker.com/r/nixos/nix
It fails with this error:
❯ docker build .
Sending build context to Docker daemon 504.6MB
Step 1/4 : FROM nixos/nix
---> 6f3d9e4c45a3
Step 2/4 : RUN whoami
---> Running in b9b9306ce3a1
root
Removing intermediate container b9b9306ce3a1
---> cd69d0600a6d
Step 3/4 : RUN nix-channel --update
---> Running in a7b8a55e7f53
error: Operation not permitted
Expected behavior
nix-channel --update
is executable by the default image user (root)
nix-env --version
output
I don't know, I can't run that either
Additional context
Found while trying to create a dockerfile which replicates this airflow bug: https://github.com/apache/airflow/issues/25330
It seems to have broken with 2.10.0. With 2.9.0 it still works.
I can't reproduce with 2.10.0 either (same hash as the one in the issue) :thinking: Any idea what might cause the different behaviors?