-
Notifications
You must be signed in to change notification settings - Fork 18
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
How to build and push an image? #143
Comments
Run the nix binary produced by an expression like Lines 346 to 348 in 7b251c9
See the function signature: Lines 98 to 103 in b4cd262
You don't need a docker daemon or containerd to push images to registries. This binary will copy the image directly to a registry given the Some clarifications:
|
Got it, thank you! |
Hi, thank you for this cool project! Sorry, I have some dumb questions:
If the goal is to define an image with Nix and then push it to a registry, am I correct that we need to:
containerd
withnix-snapshotter
integration is set up and runningpkgs.nix-snapshotter.buildImage
docker tag nix:0${image} my.registry.com/name:tag
docker push my.registry.com/name:tag
and if it's not feasible to have
containerd
running in the current environment (e.g. it is a CI environment without any services or user namespace support), then build a VM to do all of the above and run it.Is this accurate?
Would this allow skipping local instantiation of the Nix store paths for layers that are already on the target registry?
I tried to do the above with nix2container but ran into some trouble due to what I think is compression. Do you know if using nix-snapshotter +
docker push
would fare better?Thanks!
The text was updated successfully, but these errors were encountered: