[Buildroot] [PATCH v1 3/3] package/genuinetools-img: new host and target package

Peter Korsgaard peter at korsgaard.com
Tue May 11 11:19:17 UTC 2021


>>>>> "Christian" == Christian Stewart <christian at paral.in> writes:

 > Hi Yann,
 > On Tue, May 4, 2021 at 1:31 PM Yann E. MORIN <yann.morin.1998 at free.fr> wrote
 >> Im not usre I understood that, but basically one would write:
 >> 
 >> HELLO_WORLD_VERSION = 1.2.3
 >> HELLO_WORLD_SOURCE = hello-world:1.2.3
 >> HELLO_WORLD_SITE = dockerhub.com/u/hello
 >> 
 >> $(eval $(oci-image-package))
 >> 
 >> And that would download the hello-world:1.2.3 image from dockerhub and
 >> install that as a OCI image in the target filesystem, so that at runtime
 >> one could do (on the CLI, in an init script, in a systemd unit, etc...):
 >> docker run hello-world:1.2.3 /bin/hello-world
 >> 
 >> Something like that?

 > Yes, the "download" step would use host "img pull" to download the OCI
 > image, and then "img save" to store it as a .tar.gz, (which we can
 > then hash as a downloaded tar.gz file).

 > The .tar.gz can be loaded into Docker with "docker load < the-image.tar.gz"

 > The image-package helper could just download the image + save it (to
 > images dir, optionally).

So you would end up with a tar file for each container image in the
rootfs? Is that a desirable setup? Containers often share image layers,
so a single tar.gz of N containers is normally quite a bit smaller and
more efficient than N individual .tar.gz files.

What I do is basically just:
docker save -o docker.tar <container1> <container2> .. <containerN>

And then a single docker load at runtime.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list