[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [atomic-devel] Reducing the footprint of the Fedora docker base image





On Thu, Feb 11, 2016 at 10:30 AM, Colin Walters <walters verbum org> wrote:
On Wed, Feb 10, 2016, at 04:17 PM, Josh Berkus wrote:
> On 02/10/2016 12:42 PM, Clayton Coleman wrote:
> > Removing dnf would break most people who depend on fedora base images,
> > since installing new packages is the reason people depend on the
> > fedora base image.  Creating a fedora base image would dnf is
> > interesting as a side project (fedora-minimal?) but I doubt would ever
> > see wide use in the community, because it would double or triple the
> > amount of work someone has to do to actually use the image.  It would
> > appear to the user as if the fedora image is broken with very little
> > explanation, and not fit the common use people have for OS base
> > images.
>
> Well, we can do without DNF and RPM for OStree-built images, no?

To be clear, Josh is talking about a demo I did at Devconf.cz:
https://twitter.com/cgwalters/status/696277020255350785
Upstream code is in a PR:
https://github.com/projectatomic/rpm-ostree/pull/209

However, it's *very* trivial to make "as small as current RPM packages will let you"
images by simply doing `yum --installroot` + `docker load`.

See: https://github.com/projectatomic/rpm-ostree-toolbox/blob/master/src/py/rpmostreecompose/docker_image.py
which weighs in at 100 lines of Python.  (There's lots of variants out there of this)

What the "rpm-ostree container" approach does is basically squash together
the package manager aspect into the image management, with all of the
caching/efficiency wins that come from that.

Then it's possible to export
it into a tarball which can be wrapped into a docker image that could
be pushed directly to a Docker registry, rather than indirectly loading
it into the system daemon which does the push.

Unlike yum and the docker daemon, also this all runs as non-root.


Can I build a higher layer on top of that? 

--
Daniel Riek <riek redhat com>
* Sr. Director Systems Design & Engineering 
* Red Hat Inc, Tel. +1-617-863-6776

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]