meta-virtualization.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* Reduce Docker installation size in the disk  #meta-virtualization #yocto
@ 2024-02-26  6:09 vivsundar
  2024-02-26  6:11 ` vivsundar
  2024-02-26 13:42 ` [meta-virtualization] " Bruce Ashfield
  0 siblings, 2 replies; 3+ messages in thread
From: vivsundar @ 2024-02-26  6:09 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

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"
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.

Any help will be greatly appreciated. Thanks.

[-- Attachment #2: Type: text/html, Size: 755 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Reduce Docker installation size in the disk #meta-virtualization #yocto
  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 ` [meta-virtualization] " Bruce Ashfield
  1 sibling, 0 replies; 3+ messages in thread
From: vivsundar @ 2024-02-26  6:11 UTC (permalink / raw)
  To: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

I use yocto build(Kirkstone branch) 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"
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.

Any help will be greatly appreciated. Thanks.

[-- Attachment #2: Type: text/html, Size: 773 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-virtualization] Reduce Docker installation size in the disk #meta-virtualization #yocto
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2024-02-26 13:42 UTC (permalink / raw)
  To: vivsundar; +Cc: meta-virtualization

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-26 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [meta-virtualization] " Bruce Ashfield

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 NNTP newsgroup(s).