toolbox: add support for multi-layered docker images#5
toolbox: add support for multi-layered docker images#5jepio merged 3 commits intoflatcar:flatcar-masterfrom
Conversation
|
Thanks for this contribution. I checked what happens when a layer removes a file:
Might not cause any damage in practice but it's better to avoid it. Do you think this could be rewritten to instead use I also noticed that the resulting tarballs are not gzipped in either case, so we may as well drop that from the name. |
|
Good idea. It's much cleaner using I also modified the Btw, any reason why you used the |
|
@oliwer awesome; I didn't know about the
|
|
Done! I also thought this was a weird feature. I had to change an error message because the old one did not make sense anymore. Hopefully that's good enough. |
jepio
left a comment
There was a problem hiding this comment.
Thanks!
Now what remains is updating the commit in the ebuild in flatcar-linux/coreos-overlay, would you want to do that? The files are here: https://github.com/flatcar-linux/coreos-overlay/tree/943ce52f94b140922e25559e774c6570c41ca577/app-admin/toolbox, the xxx-9999.ebuild needs changes and the xxx-r15.ebuild symlink needs to be renamed to xxx-r16.ebuild.
|
Those filenames look weird... but sure, i'll open a PR. |
Handle multi-layered Docker images correctly
This is intended to fix flatcar/Flatcar#465 and flatcar/Flatcar#508
Currently,
toolboxassumes all Docker images are made of 1 layer : it puts the name of the layer tarball in a variable and passes it totar. This fails if the images has multiple layers, as the variable contains several filenames.This patch simply adds a for loop to extract each layer in sequence.
How to use
Run toolbox with a multi-layered docker image, like
ubuntu-debootstrap:14.04.Testing done