Skip to content

Commit

Permalink
fix(deb): only repack on older platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
curiositycasualty authored Sep 21, 2023
1 parent eb7f7a9 commit 3557d8a
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Dockerfile.deb
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ RUN set -ex; \
&& curl -fL "$DOWNLOAD_URL" -o /tmp/kong.deb \
&& echo "${KONG_SHA256} /tmp/kong.deb" | sha256sum -c -; \
fi \
&& echo "older deb systems don't support zstd compression" \
&& echo "repack using xz compression instead" \
&& ar x /tmp/kong.deb \
&& zstd -d < control.tar.zst | xz > control.tar.xz \
&& zstd -d < data.tar.zst | xz > data.tar.xz \
&& ar -m -c -a sdsd /tmp/kong-repack.deb debian-binary control.tar.xz data.tar.xz \
&& rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst \
&& apt-get update \
&& apt-get install --yes /tmp/kong-repack.deb \
&& if grep -E -qs 'buster|bullseye|xenial|bionic' /etc/os-release ; then \
echo "older deb systems don't support zstd compression"; \
echo "repack using xz compression instead" \
&& ar -x /tmp/kong.deb \
&& zstd -d < control.tar.zst | xz > control.tar.xz \
&& zstd -d < data.tar.zst | xz > data.tar.xz \
&& ar -m -c -a sdsd /tmp/kong-repack.deb debian-binary control.tar.xz data.tar.xz \
&& rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst \
&& apt-get install --yes /tmp/kong-repack.deb; \
else \
apt-get install --yes /tmp/kong.deb; \
fi \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& rm -rf /tmp/kong-repack.deb \
&& rm -rf /tmp/*.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 ${KONG_PREFIX} \
&& ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
Expand Down

0 comments on commit 3557d8a

Please sign in to comment.