By on October 26, 2017

Kong & Alpine on Docker

We are happy to announce the availability of the official Alpine based Docker image, available starting from 0.11.x by pulling the “{version}-alpine” tag, for example:

$ docker pull kong:0.11-alpine

The Alpine based image is an addition to the Kong image and does not replace – for the time being – the default CentOS based image, and it’s available on both Kong Community Edition (CE) and Enterprise Edition (EE). If you are an EE customer please use the appropriate Alpine tag to retrieve the image.

At Kong performance and portability are first class citizens. In the past few months we removed older dependencies that are not required anymore (Dnsmasq in 0.9.x, and Serf in 0.11.x), and today with Alpine support we reduced the final size of our Docker distribution as well.

Let’s look at the stats: on Docker Store the CentOS based image is reported at a compressed size of 122MB, while the new Alpine image at only 30MB, which is 75% less.

And the uncompressed size reported by docker history also shows a reduction from 313MB to 84MB.

 

$ docker history kong:0.11.0
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
604ef970973d        5 weeks ago         /bin/sh -c #(nop)  CMD ["/usr/local/openre...   0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  STOPSIGNAL [SIGTERM]         0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  EXPOSE 8000/tcp 8001/tc...   0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["/docker-en...   0B
<missing>           5 weeks ago         /bin/sh -c #(nop) COPY file:0ce55305f95ddc...   307B
<missing>           5 weeks ago         /bin/sh -c yum install -y wget https://bin...   116MB
<missing>           5 weeks ago         /bin/sh -c #(nop)  ENV KONG_VERSION=0.11.0      0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  MAINTAINER Marco Pallad...   0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B
<missing>           5 weeks ago         /bin/sh -c #(nop)  LABEL name=CentOS Base ...   0B
<missing>           5 weeks ago         /bin/sh -c #(nop) ADD file:1ed4d1a29d09a63...   197MB

$ docker history kong:0.11-alpine
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
d53207c4f9f5        6 weeks ago         /bin/sh -c #(nop)  CMD ["/usr/local/openre...   0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  STOPSIGNAL [SIGTERM]         0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  EXPOSE 8000/tcp 8001/tc...   0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  ENTRYPOINT ["/docker-en...   0B
<missing>           6 weeks ago         /bin/sh -c #(nop) COPY file:0ce55305f95ddc...   307B
<missing>           6 weeks ago         /bin/sh -c apk update  && apk add --virtua...   79.3MB
<missing>           6 weeks ago         /bin/sh -c #(nop)  ENV KONG_SHA256=34cfd44...   0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  ENV KONG_VERSION=0.11.0      0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  MAINTAINER Marco Pallad...   0B
<missing>           6 weeks ago         /bin/sh -c #(nop)  CMD ["/bin/sh"]              0B
<missing>           6 weeks ago         /bin/sh -c #(nop) ADD file:4583e12bf5caec4...   3.97MB

 

The Alpine-based image is a new addition to the Kong ecosystem and we recommend to use it carefully in staging environments and to report back to the Kong team any problem/feedback you may encounter. The long-term plan is to gradually make the Alpine-based image the default Docker image for Kong.

Please also let us know if you would like to use Kong with other base images besides CentOS or Alpine.