-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Multiple layers docker images don't work #27632
Comments
cc @lo1tuma |
Maybe this feature has been working with older images which did't have this configuration file (docker load works well without it). This file could be related to the registry v2, but I'm really not sure about this. |
So far I’ve only used base images that were also built with nixpkgs dockerTools which works fine. I’ve never used it in combination with |
@lo1tuma I think it works well because |
This broke docker builds for us
The config is trivial, we use |
@Fuuzetsu I cannot reproduce your issue. I successfully built:
Can you provide me the base image you are using? Or could you upgrade it ? :/ |
@nlewo I did a little more digging and the problem seems to be that images can't be composed; that is both your image above and the very basic one we use work but they break once they get used in
and the output
|
If the base image has been built with nixpkgs.dockerTools, the image configuration and manifest are readonly so we first need to change their permissions before removing them. Fix NixOS#27632.
@Fuuzetsu Thanks for your example. I also reproduce with |
If the base image has been built with nixpkgs.dockerTools, the image configuration and manifest are readonly so we first need to change their permissions before removing them. Fix #27632.
Issue description
I created an Docker image with a nix
content
and ubuntu as a base layer. When I run this image, Docker only see the base layers.It seems this is because the base image contains an image
config.json
file which is also imported in the created image. In this case, it seems Docker uses this file instead of therepositories
generated file.Steps to reproduce
Consider the file
multiple-layers.nix
:Then, build the image and load it
The last output is empty while it should show the nix folder.
Technical details
nixos-version
, Ubuntu/Fedora:lsb_release -a
, ...)nix-env --version
)nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion
)97544a6
grep build-use-sandbox /etc/nix/nix.conf
)The text was updated successfully, but these errors were encountered: