vert-x3 / vertx-stack

Vert.x stack
Apache License 2.0
120 stars 48 forks source link

Use optimized (smaller) base image for stack-docker #46

Closed aschrijver closed 8 years ago

aschrijver commented 8 years ago

Vert.x is all about lean, mean, performance, and keeping it simple, yet the java:jre8 base image is 310 MB large.

The size is why I am not using the docker-stack right now. I wonder if a more lighter-weight, optimized image can be used instead?

For example I currently use anapsix/alpine-java:jre8 with Vert.x which only amounts to 122 MB (but there are other candidates as well). Saves a lot of file transfer and storage (think dockerized microservice CD pipeline running in the cloud, lotsa images moving around, etc.).

(Note that the anapsix image may be too stripped down for general use, as there is not even a command prompt, etc.)

aschrijver commented 8 years ago

(For completeness: https://imagelayers.io/?images=java:8u72-jre,anapsix%2Falpine-java:jre8)

cescoffier commented 8 years ago

I definitely agree. I've started using the alpine based image last week, so far so good... So no problem to switch.

pmlopes commented 8 years ago

I'd recommend to use a image from the official java repo https://hub.docker.com/_/java/ since they are kept up to date by docker themselves.

I've used alpine too and it works fine however for strong encryption you will need oracle jdk i'm afraid.

aschrijver commented 8 years ago

Cool! Thanks.

cescoffier commented 8 years ago

@pmlopes yes for encryption you would need your own image with Oracle. We are not providing these.

aschrijver commented 8 years ago

Yes, the alpine image I use also has Oracle installed. Don't know if there is an official image that has that too (should be 'official' but not 'java', that's all OpenJDK).