fabric8io-images / s2i

OpenShift S2I images for Java and Karaf applications
Apache License 2.0
70 stars 84 forks source link

Using a minimum base image #192

Open vorburger opened 5 years ago

vorburger commented 5 years ago

In #160 @gunnarmorling suggested among other things, quote:

How about using a minimum image (e.g. registry.centos.org/centos/centos7-atomic or registry.fedoraproject.org/fedora-minimal) as a basis?

I propose that we work incrementally, and keep #160 focused on (a first version of) just Java 11 support, wrap that up and get it merged, and then iterate to improve things e.g. re. the point raised above under this issue.

vorburger commented 5 years ago

@gunnarmorling I've just, very briefly, tried to both FROM registry.fedoraproject.org/fedora-minimal (instead of FROM fedora:29) and FROM registry.centos.org/centos/centos7-atomic instead (FROM centos:7) but I don't get very far either way... that does not even include yum (nor dnf), so ... how would one use this? Got any pointers / references to related docs? Sorry, total noob on this front and never looked more closely into this kind of stuff.

@ctron @rhuss shout if you have any input.

vorburger commented 5 years ago
$ docker pull centos/centos7-atomic 
$ docker images | grep centos7-atomic
registry.centos.org/centos/centos7-atomic   latest              dea5eec68f43        9 months ago        78.1 MB

$ docker pull registry.fedoraproject.org/fedora-minimal
$ docker images | grep minimal                         
registry.fedoraproject.org/fedora-minimal   latest              5da410660a75        2 months ago        91.8 MB

$ docker images | grep centos 
docker.io/centos                            7                   1e1148e4cc2c        9 days ago          202 MB

$ docker pull gcr.io/distroless/java 
$ docker pull gcr.io/distroless/static
$ docker pull gcr.io/distroless/cc    
$ docker images | grep distroless     
gcr.io/distroless/java                      latest              f1692385bbb2        48 years ago        119 MB
gcr.io/distroless/cc                        latest              2cd3e75a4e8b        48 years ago        18.8 MB
gcr.io/distroless/static                    latest              06f8d4161170        48 years ago        1.81 MB

BTW: The image sizes reported by podman images are slightly bigger than by docker images.

vorburger commented 5 years ago

https://pagure.io/atomic-wg/issue/290