11FROM debian:bullseye-slim
22
3- ARG KONG_VERSION=2.8.3
3+ ARG KONG_VERSION=2.8.4
44ENV KONG_VERSION $KONG_VERSION
55
6- ARG KONG_SHA256="5f1298c36791456f6ef67420a4aca391c90ba9051f38caa0d9cfac3c6424d839 "
6+ ARG KONG_SHA256="28f7f215a097612f35d3ae86d35c3fbb24a1454a7529f500e2341d5764a5d8a5 "
77
88ARG KONG_PREFIX=/usr/local/kong
99ENV KONG_PREFIX $KONG_PREFIX
@@ -17,35 +17,25 @@ RUN set -ex; \
1717 arch="$(dpkg --print-architecture)"; \
1818 major_minor="$(echo "${KONG_VERSION%.*}" | tr -d '.')"; \
1919 apt-get update; \
20- apt-get install -y curl zstd xz-utils binutils ; \
20+ apt-get install -y curl; \
2121 if [ "$ASSET" = "remote" ] ; then \
22- CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2) \
23- && DOWNLOAD_URL="https://packages.konghq.com/public/gateway-${major_minor}/deb/debian/pool/${CODENAME}/main/k/ko/kong_${KONG_VERSION}/kong_${KONG_VERSION}_$arch.deb" \
24- && curl -fL "$DOWNLOAD_URL" -o /tmp/kong.deb \
22+ CODENAME=$(grep -m1 VERSION_CODENAME /etc/os-release | cut -d = -f 2); \
23+ DOWNLOAD_URL="https://packages.konghq.com/public/gateway-${major_minor}/deb/debian/pool/${CODENAME}/main/k/ko/kong_${KONG_VERSION}/kong_${KONG_VERSION}_${ arch} .deb"; \
24+ curl -fL "$DOWNLOAD_URL" -o /tmp/kong.deb \
2525 && echo "${KONG_SHA256} /tmp/kong.deb" | sha256sum -c -; \
2626 fi \
27- && if grep -E -qs 'buster|bullseye|xenial|bionic' /etc/os-release ; then \
28- echo "older deb systems don't support zstd compression"; \
29- echo "repack using xz compression instead" \
30- && ar -x /tmp/kong.deb \
31- && zstd -d < control.tar.zst | xz > control.tar.xz \
32- && zstd -d < data.tar.zst | xz > data.tar.xz \
33- && ar -m -c -a sdsd /tmp/kong-repack.deb debian-binary control.tar.xz data.tar.xz \
34- && rm debian-binary control.* data.* \
35- && apt-get install --yes /tmp/kong-repack.deb; \
36- else \
37- apt-get install --yes /tmp/kong.deb; \
38- fi \
27+ && apt-get update \
28+ && apt-get install --yes /tmp/kong.deb \
3929 && rm -rf /var/lib/apt/lists/* \
40- && rm -rf /tmp/* .deb \
30+ && rm -rf /tmp/kong .deb \
4131 && chown kong:0 /usr/local/bin/kong \
4232 && chown -R kong:0 ${KONG_PREFIX} \
4333 && ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
4434 && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
4535 && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
4636 && ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
4737 && kong version \
48- && apt-get purge curl zstd xz-utils binutils -y
38+ && apt-get purge curl -y
4939
5040COPY docker-entrypoint.sh /docker-entrypoint.sh
5141
@@ -57,6 +47,6 @@ EXPOSE 8000 8443 8001 8444 $EE_PORTS
5747
5848STOPSIGNAL SIGQUIT
5949
60- HEALTHCHECK --interval=60s --timeout=10s --retries=10 CMD kong- health
50+ HEALTHCHECK --interval=60s --timeout=10s --retries=10 CMD kong health
6151
6252CMD ["kong", "docker-start"]
0 commit comments