[Buildroot] [All Systems Go!] Buildroot : Using embedded tools to build container images

François Perrad francois.perrad at gadz.org
Sun Sep 22 18:07:15 UTC 2019


Le dim. 22 sept. 2019 à 16:58, Arnout Vandecappelle <arnout at mind.be> a
écrit :

>
>
> On 22/09/2019 15:13, François Perrad wrote:
> > Le sam. 21 sept. 2019 à 21:53, Romain Naour <romain.naour at smile.fr> a
> > écrit :
> >
> >> Hello,
> >>
> >> My colleague Jeremy Rosen did a presentation at All Systems Go
> conferences
> >> about
> >> building container images using Buildroot:
> >>
> >> https://www.youtube.com/watch?v=-CVuBLDpulo
>
>  Really interesting talk, thanks for pointing this out!
>
>
> >> It would be interesting to discuss with the community about building
> such
> >> container images like light container or systemd's portable services.
> >>
> >> It's probably a topic for the next Buildroot Meeting :)
> >>
> >>
> > It seems easy to create a Docker image artifact from a rootfs created by
> > Buildroot
> >
> >     $ cat Dockerfile
> >     FROM scratch
> >     ADD rootfs.tar /
> >
> >     $ docker build --tag br:my_proj .
> >     Sending build context to Docker daemon  4.233MB
> >     Step 1/2 : FROM scratch
> >      --->
> >     Step 2/2 : ADD rootfs.tar /
> >      ---> 60cb2207066c
> >     Successfully built 60cb2207066c
> >     Successfully tagged br:my_proj
>
>  Does this also work if the tarball is cross-compiled for a different
> architecture? Probably it does, and it just SIGILLs when you try to run the
> container...
>
> >
> >     $ docker images
> >     REPOSITORY          TAG                 IMAGE ID            CREATED
> >         SIZE
> >     br                  my_proj             60cb2207066c         2
> minutes
> > ago      1.74MB
> >
> >     $ docker save -o br_my_proj.tar br:my_proj
> >     $ ls -1
> >     br_my_proj.tar
> >     Dockerfile
> >     rootfs.tar
> >
> > But, it could be nice to add "Docker image" as an option in "Filesystem
> > images" choice.
>
>  Yeah, except unfortunately docker security sucks, so on most distros you
> need
> sudo to run any docker command, even 'docker build'.
>
>
see section "Manage Docker as a non-root user" in
https://docs.docker.com/install/linux/linux-postinstall/
on Ubuntu, I just run:
    $ sudo usermod -aG docker $USER

François

 So, it would be nice if we could generate the OCI image without docker.
>
>  Something was said about this in the questions of Jérémy's
> presentation, but
> there was no clear answer.
>
>  Regards,
>  Arnout
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190922/a48244b8/attachment-0002.html>


More information about the buildroot mailing list