openzipkin-attic / docker-zipkin

Docker images for OpenZipkin
Apache License 2.0
688 stars 329 forks source link

Squash the base image after deleting the JDK stuff #62

Closed codefromthecrypt closed 9 years ago

codefromthecrypt commented 9 years ago

We only use the JRE part of the base image. If you execute the below, then apply docker-squash, we cut 40MB. This means faster docker pulls, less time re-creating docker hosts, etc.

Insert into base's Dockerfile

# Remove JDK components as all we need is a full-profile JRE
RUN rm -rf /usr/local/java/bin /usr/local/java/lib /usr/local/java/include

Example result of docker-squash

REPOSITORY                       TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
squash                           latest              fb2e3c83623b        12 seconds ago      124.4 MB
quay.io/openzipkin/zipkin-base   base-1.17.1         0fb342303dab        6 minutes ago       165.5 MB

Tested with docker-compose.yml here and in zipkin-java