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

Why not make this the official Dockerfile for Nix? #3

Open
CMCDragonkai opened this issue Feb 5, 2017 · 5 comments
Open

Why not make this the official Dockerfile for Nix? #3

CMCDragonkai opened this issue Feb 5, 2017 · 5 comments

Comments

@CMCDragonkai
Copy link

It seems that this is more raw as a container for Nix, and it's smaller too.

It also seems this is more updated, since the current Nix container is only at 1.11.

Would be better to market this container as the official Nix container.

And the nixpkgs container should be quietly deprecated (https://hub.docker.com/r/nixos/nixpkgs/).

@LnL7
Copy link
Owner

LnL7 commented Feb 11, 2017

The main reason for me is the fact that this still needs some manual work to build. I improved it with the last update but it's not using dockerTools yet.

@PierreR
Copy link

PierreR commented May 11, 2018

@LnL7 Is it possible to use dockerTools at all. I have tried this:

  lnl7_niximage = pkgs.dockerTools.pullImage {
   imageName = "lnl7/nix";
   finalImageTag = "2.0";
   imageDigest = "sha256:632268d5fd9ca87169c65353db99be8b4e2eb41833b626e09688f484222e860f";
   sha256 = "20d9485b25ecfd89204e843a962c1bd70e9cc6858d65d7f5fadc340246e2116b";
  };

but I don't know where to get the sha256 from. Using a wrong sha256 I ended up with the error:
claims to be content-addressed but isn't

@PierreR
Copy link

PierreR commented May 12, 2018

Generating the sha256 with nix-hash --type sha256 lnl7.tar (where the tar is the result of docker save I have got:

warning: path '/nix/store/bacpxcf1c8xzzk15vd8k7p4lyx9d45k2-docker-image-lnl7-nix-2.0.tar' claims to be content-addressed but isn't

@LnL7
Copy link
Owner

LnL7 commented May 12, 2018

I've not really used pullImage, but it's probably nix-hash --flat --type sha256 <tar>. Also note that the version images can change , you might want to use the date tags.

@PierreR
Copy link

PierreR commented May 12, 2018

@LnL7 The --flat didn't fix it. The utility of the sha256 field is a bit confusing. I don't see why the imageDigest field generated with skopeo isn't enough. I will try to find out from the ones behind the recent updates of pullImage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants