[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [atomic-devel] ostree-docker-builder
- From: Clayton Coleman <ccoleman redhat com>
- To: Giuseppe Scrivano <gscrivan redhat com>
- Cc: "atomic-devel projectatomic io" <atomic-devel projectatomic io>
- Subject: Re: [atomic-devel] ostree-docker-builder
- Date: Wed, 30 Sep 2015 23:56:04 +0200
Can we get this into Openshift as a new builder strategy / or source?
It's an excellent story for non-root builds.
> On Sep 30, 2015, at 9:01 PM, Giuseppe Scrivano <gscrivan redhat com> wrote:
>
> Hello,
>
> I was experimenting for fun with creating Docker images using rpm-ostree
> instead of "docker build". rpm-ostree already supports it, and it can
> be specified in the .json file setting the "container" flag to true.
> The generated tree can be tarred and imported directly into Docker.
>
> I wrote a small program to simplify the generation of the image,
> available on github:
>
> https://github.com/giuseppe/ostree-docker-builder
>
> The commands below, for example, will be enough to generate an Emacs
> container:
>
> $ cat emacs.json
> {
> "ref": "fedora-atomic/f22/x86_64/emacs",
> "repos": ["fedora-22"],
> "container": true,
> "packages": ["emacs"]
> }
>
> $ sudo rpm-ostree --repo=repo compose tree emacs.json
> $ sudo ostree-docker-builder --repo=repo -c emacs fedora-atomic/f22/x86_64/emacs --entrypoint=/usr/bin/emacs-24.5
>
> ostree-docker-builder also supports pushing the image to the registry if
> something has changed (thanks to Colin for suggesting this!), it uses a
> Docker LABEL to remember the OStree commit used to generate to image.
>
> The two advantages of using it are:
>
> - The same tool to generate the OS image and the containers.
> - Use OStree to track what files were changed, added or removed. If there are no differences then no image is created.
>
> Any comments?
>
> Thanks,
> Giuseppe
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]