Nixos/nix docker image is not compatible with BitBucket pipelines

Hi,

I wasn’t found info about issue tracker for nixos/nix docker image on docker hub.
Github issues doesn’t fit exactly and there is a lot of issues.
Today I tried to setup CI/CD on a git repository on BitBucket and pipeline fails just on nixos/nix docker images, meanwhile ubuntu and alphine are doing well in the same environment.

nixos/nix image doesn’t have a lot in /bin and /usr/bin and BitBucket pipeline depends on these basic bins.

I had to wrap stock image with:

FROM docker.io/nixos/nix:2.20.8
RUN set eux ; \
    find /root/.nix-profile/bin -type l -executable | \
      while read a ; do \
        for p in /bin /usr/bin ; do \
          [ -f $p/$(basename $a) ] || cp $a $p/$(basename $a) ; done ; done

Where is repo for nixos docker images?
Could it be merged into it?

1 Like

I also have the same problem.

I even opened an issue for bitbucket-pipelines here: https://jira.atlassian.com/browse/BCLOUD-21567
But it gets ignored since 2022, so I don’t think that this is going to be solved on their end.

It would be really cool if we could fix this in the official Nix image.

1 Like

After a bit of research, I think the official Nix image is built & deployed from within the Nix repository itself: nix/maintainers/upload-release.pl at 7e68306a4bfb76f2a8d714de4691ab937a0ee58f · NixOS/nix · GitHub

Edit
I think the change would need to be made here: nix/docker.nix at 7e68306a4bfb76f2a8d714de4691ab937a0ee58f · NixOS/nix · GitHub

1 Like

I’ve now opened an issue for this to find out if the official image can be patched:

1 Like