meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: vivsundar@gmail.com
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization] Reduce Docker installation size in the disk #meta-virtualization #yocto
Date: Mon, 26 Feb 2024 08:42:12 -0500	[thread overview]
Message-ID: <CADkTA4NPmYW-0qvwv7ketysjm=8ibWeM6d78P2xSpupkF-6sTg@mail.gmail.com> (raw)
In-Reply-To: <8uml.1708927764963219775.KWwp@lists.yoctoproject.org>

On Mon, Feb 26, 2024 at 1:09 AM <vivsundar@gmail.com> wrote:
>
> I use yocto build for creating Kernel and Rootfs images to be used in CM4 module.  I use core-image-minimal which produces a nice 30M (Kernel + RFS) image.  But when is include docker with:
>
> IMAGE_INSTALL:append = " python3-docker-compose"

Unless you are actively building docker deployments on the target, you
shouldn't need anything related to docker-compose.

> IMAGE_INSTALL:append = " docker-ce"
>
> The image size increases by 320M(Kernel + RFS).  Is there a way to remove some unnecessary components from docker?  I am quite new to docker and its internal components.
> I have fixed offsets in by boot loader, so, I am finding it hard to boot the board with the new Kernel and RFS.

Docker is not a small / light stack (when considered in embedded
terms). Most of the backends and broad support are not from external
libraries, etc, and as such are not easy to configure out of the
build. I've never spent much time looking to see if we could make any
of them optional. I set the default build options (DOCKER_BUILDTAGS)
to already be fairly light in the recipe, but you could always look to
see if more could be removed. I don't think you'll find significant
things to remove and not much size removed. golang itself is going to
take up quite a bit of space, as will the other package dependencies
of docker.

If you are size constrained on your target, my suggestion is to just
use the container runtimes directly.  Just putting runc or crun on the
target to execute OCI containers is much lighter than any of the
container frameworks.

Bruce

>
> Any help will be greatly appreciated. Thanks.
>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#8582): https://lists.yoctoproject.org/g/meta-virtualization/message/8582
> Mute This Topic: https://lists.yoctoproject.org/mt/104577876/1050810
> Mute #meta-virtualization:https://lists.yoctoproject.org/g/meta-virtualization/mutehashtag/meta-virtualization
> Mute #yocto:https://lists.yoctoproject.org/g/meta-virtualization/mutehashtag/yocto
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


      parent reply	other threads:[~2024-02-26 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26  6:09 Reduce Docker installation size in the disk #meta-virtualization #yocto vivsundar
2024-02-26  6:11 ` vivsundar
2024-02-26 13:42 ` Bruce Ashfield [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADkTA4NPmYW-0qvwv7ketysjm=8ibWeM6d78P2xSpupkF-6sTg@mail.gmail.com' \
    --to=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=vivsundar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).