-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reinstate Kong Alpine 2.8.5 as the main version #17067
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I did some local munging of Diff:diff --git a/_bashbrew-cat b/_bashbrew-cat
index 2b56589..83f570c 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,14 +1,14 @@
Maintainers: Kong Docker Maintainers <[email protected]> (@team-gateway-bot)
GitRepo: https://github.com/Kong/docker-kong.git
-Tags: 2.8.4-alpine, 2.8.4, 2.8
-GitFetch: refs/tags/2.8.4
-GitCommit: 1c31704cdc9bbd2c0a20e5479eb307140339582b
+Tags: 2.8.5-alpine, 2.8-alpine, 2.8.5, 2.8, 2
+GitFetch: refs/tags/2.8.5
+GitCommit: 246616ef3ccd0016c9911cc55dd5891f050ba065
Directory: alpine
-Tags: 2.8.4-ubuntu, 2.8-ubuntu
-GitFetch: refs/tags/2.8.4
-GitCommit: 1c31704cdc9bbd2c0a20e5479eb307140339582b
+Tags: 2.8.5-ubuntu, 2.8-ubuntu
+GitFetch: refs/tags/2.8.5
+GitCommit: 246616ef3ccd0016c9911cc55dd5891f050ba065
Directory: ubuntu
Tags: 3.4.2-ubuntu, 3.4-ubuntu, 3.4.2, 3.4
diff --git a/_bashbrew-list b/_bashbrew-list
index 1b9332d..263ed45 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,8 +1,10 @@
+kong:2
kong:2.8
+kong:2.8-alpine
kong:2.8-ubuntu
-kong:2.8.4
-kong:2.8.4-alpine
-kong:2.8.4-ubuntu
+kong:2.8.5
+kong:2.8.5-alpine
+kong:2.8.5-ubuntu
kong:3
kong:3.4
kong:3.4-ubuntu
diff --git a/kong_2.8-ubuntu/Dockerfile b/kong_2.8-ubuntu/Dockerfile
index 6d3d2de..f9c9723 100644
--- a/kong_2.8-ubuntu/Dockerfile
+++ b/kong_2.8-ubuntu/Dockerfile
@@ -7,10 +7,10 @@ ARG EE_PORTS
COPY kong.deb /tmp/kong.deb
-ARG KONG_VERSION=2.8.4
+ARG KONG_VERSION=2.8.5
ENV KONG_VERSION $KONG_VERSION
-ARG KONG_AMD64_SHA="e4bc62c80f717114cc486776ee453931c5de0e8eaf0901ac11dbb4b2bae14534"
+ARG KONG_AMD64_SHA="efba2bb8b1cb567bc90cc371e80503c558cbc74377b34609552ae2273def3fe3"
ARG KONG_ARM64_SHA="4fff44f9a0c7b06469591b7d1499a99a100109bc3f08dc412dd0eb38ff383d35"
# hadolint ignore=DL3015
@@ -36,15 +36,15 @@ RUN set -ex; \
# Please update the ubuntu install docs if the below line is changed so that
# end users can properly install Kong along with its required dependencies
# and that our CI does not diverge from our docs.
- && apt install --yes /tmp/kong.deb \
+ && apt install --yes /tmp/kong.deb luarocks\
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/kong.deb \
&& chown kong:0 /usr/local/bin/kong \
&& chown -R kong:0 /usr/local/kong \
- && ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
- && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
- && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
- && ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
+ && ln -sf /usr/local/openresty/bin/resty /usr/local/bin/resty \
+ && ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
+ && ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
+ && ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
&& if [ "$ASSET" = "ce" ] ; then \
kong version ; \
fi
diff --git a/kong_2.8/Dockerfile b/kong_2/Dockerfile
similarity index 25%
rename from kong_2.8/Dockerfile
rename to kong_2/Dockerfile
index 0a4e724..f3a089a 100644
--- a/kong_2.8/Dockerfile
+++ b/kong_2/Dockerfile
@@ -1,58 +1,43 @@
FROM alpine:3.18
-LABEL maintainer="Kong <[email protected]>"
+ARG KONG_VERSION=2.8.5
+ENV KONG_VERSION $KONG_VERSION
+
+ARG KONG_AMD64_SHA="22a5cd7c981ec15b34db105aabac7815bd589380a8d27d0c9e138657a9da6332"
-ARG ASSET=ce
-ENV ASSET $ASSET
+ARG KONG_PREFIX=/usr/local/kong
+ENV KONG_PREFIX $KONG_PREFIX
+ARG ASSET=remote
ARG EE_PORTS
-# hadolint ignore=DL3010
COPY kong.tar.gz /tmp/kong.tar.gz
-ARG KONG_VERSION=2.8.4
-ENV KONG_VERSION $KONG_VERSION
-
-ARG KONG_AMD64_SHA="930b3b933b6c3f0393700433a919745900485d19e0cd8aba2d70aa066ccd10d2"
-ARG KONG_ARM64_SHA="9027da2a4df477b462f34da9450412012ffdc0f9019e33ed7ff8e88f3df062c6"
-
-# hadolint ignore=DL3018
-RUN set -eux; \
- arch="$(apk --print-arch)"; \
+RUN set -ex; \
major_minor="$(echo "${KONG_VERSION%.*}" | tr -d '.')"; \
- case "${arch}" in \
- x86_64) KONG_SHA256=$KONG_AMD64_SHA ;; \
- aarch64) KONG_SHA256=$KONG_ARM64_SHA ;; \
- esac; \
- if [ "$ASSET" = "ce" ] ; then \
- apk add --no-cache --virtual .build-deps curl wget tar ca-certificates \
- && curl -fL "https://packages.konghq.com/public/gateway-${major_minor}/raw/names/kong-${arch}/versions/${KONG_VERSION}/kong-${KONG_VERSION}.${arch}.apk.tar.gz" -o /tmp/kong.tar.gz \
- && echo "$KONG_SHA256 /tmp/kong.tar.gz" | sha256sum -c - \
- && apk del .build-deps; \
- else \
- # this needs to stay inside this "else" block so that it does not become part of the "official images" builds (https://github.com/docker-library/official-images/pull/11532#issuecomment-996219700)
- apk upgrade; \
+ KONG_SHA256=$KONG_AMD64_SHA ; \
+ apk add bash curl ca-certificates; \
+ if [ "$ASSET" = "remote" ] ; then \
+ curl -fL "https://packages.konghq.com/public/gateway-${major_minor}/alpine/any-version/main/x86_64/kong-${KONG_VERSION}.apk" -o /tmp/kong.tar.gz \
+ && echo "$KONG_SHA256 /tmp/kong.tar.gz" | sha256sum -c -; \
fi \
- && mkdir /kong \
- && tar -C /kong -xzf /tmp/kong.tar.gz \
- && mv /kong/usr/local/* /usr/local \
- && mv /kong/etc/* /etc \
- && rm -rf /kong \
- && apk add --no-cache libstdc++ libgcc openssl pcre perl tzdata libcap zip bash zlib zlib-dev git ca-certificates \
+ && apk add --no-cache --virtual .build-deps tar gzip \
+ && tar -C / -xzf /tmp/kong.tar.gz \
+ && apk add --no-cache libstdc++ libgcc openssl pcre perl tzdata libcap zlib zlib-dev bash luarocks yaml \
&& adduser -S kong \
&& addgroup -S kong \
- && mkdir -p "/usr/local/kong" \
- && chown -R kong:0 /usr/local/kong \
+ && mkdir -p "${KONG_PREFIX}" \
+ && chown -R kong:0 ${KONG_PREFIX} \
&& chown kong:0 /usr/local/bin/kong \
- && chmod -R g=u /usr/local/kong \
+ && chmod -R g=u ${KONG_PREFIX} \
&& rm -rf /tmp/kong.tar.gz \
- && ln -s /usr/local/openresty/bin/resty /usr/local/bin/resty \
- && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
- && ln -s /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
- && ln -s /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
- && if [ "$ASSET" = "ce" ] ; then \
- kong version; \
- fi
+ && ln -sf /usr/local/openresty/bin/resty /usr/local/bin/resty \
+ && ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
+ && ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
+ && ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
+ && ln -sf /usr/local/lib/luarocks/*/luarocks/*/bin/luarocks-admin /usr/local/bin/luarocks-admin \
+ && apk del .build-deps \
+ && kong version
COPY docker-entrypoint.sh /docker-entrypoint.sh
diff --git a/kong_2.8/docker-entrypoint.sh b/kong_2/docker-entrypoint.sh
similarity index 100%
rename from kong_2.8/docker-entrypoint.sh
rename to kong_2/docker-entrypoint.sh
diff --git a/kong_2.8/kong.tar.gz b/kong_2/kong.tar.gz
similarity index 100%
rename from kong_2.8/kong.tar.gz
rename to kong_2/kong.tar.gz Doing this still brings a surprisingly large delta -- is that intentional? |
Hello @tianon, thank you for checking. I have reviewed the diff and I think it is correct.
The diff coincides with the diff generated from the new head of 2.8.x and the previous one: |
|
This comment has been minimized.
This comment has been minimized.
@tianon I added --no-cache as requested, thank you! |
GitCommit: cdf93ae2106f998a2245a3eee6814b1ae68781af | ||
GitFetch: refs/tags/2.8.5 | ||
Directory: ubuntu | ||
Architectures: amd64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why we don't have arm64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We literally don't build it any more. The low usage made us invest the resources into something else when we changed our build.
There was some confusion during the release of kong 2.8.5. While on the 3.x series we no longer maintain Alpine, it is still maintained in 2.x As such, this PR reinstates Alpine as the head for 2.8.x. The change in the Ubuntu SHA is due to the fact that we had to add a new commit to the branch in order to rebuild alpine. The ubuntu files are otherwise unchanged
Diff for 904f618:diff --git a/_bashbrew-cat b/_bashbrew-cat
index 253f3dd..581cba4 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,9 +1,14 @@
Maintainers: Kong Docker Maintainers <[email protected]> (@team-gateway-bot)
GitRepo: https://github.com/Kong/docker-kong.git
-Tags: 2.8.5-ubuntu, 2.8-ubuntu, 2.8.5, 2.8, 2
+Tags: 2.8.5-alpine, 2.8-alpine, 2.8.5, 2.8, 2
GitFetch: refs/tags/2.8.5
-GitCommit: 3fe94ba928bf75b385bd98aa2d5ad07b86fd3eb8
+GitCommit: cdf93ae2106f998a2245a3eee6814b1ae68781af
+Directory: alpine
+
+Tags: 2.8.5-ubuntu, 2.8-ubuntu
+GitFetch: refs/tags/2.8.5
+GitCommit: cdf93ae2106f998a2245a3eee6814b1ae68781af
Directory: ubuntu
Tags: 3.4.2-ubuntu, 3.4-ubuntu, 3.4.2, 3.4
diff --git a/_bashbrew-list b/_bashbrew-list
index c67a87a..263ed45 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,7 +1,9 @@
kong:2
kong:2.8
+kong:2.8-alpine
kong:2.8-ubuntu
kong:2.8.5
+kong:2.8.5-alpine
kong:2.8.5-ubuntu
kong:3
kong:3.4
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index 05e66d4..dafab4e 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -1,4 +1,5 @@
kong:2
+kong:2.8-ubuntu
kong:3.4
kong:3.5
kong:3.6
diff --git a/kong_2/Dockerfile b/kong_2.8-ubuntu/Dockerfile
similarity index 100%
copy from kong_2/Dockerfile
copy to kong_2.8-ubuntu/Dockerfile
diff --git a/kong_2/docker-entrypoint.sh b/kong_2.8-ubuntu/docker-entrypoint.sh
similarity index 100%
copy from kong_2/docker-entrypoint.sh
copy to kong_2.8-ubuntu/docker-entrypoint.sh
diff --git a/kong_2/kong.deb b/kong_2.8-ubuntu/kong.deb
similarity index 100%
rename from kong_2/kong.deb
rename to kong_2.8-ubuntu/kong.deb
diff --git a/kong_2/Dockerfile b/kong_2/Dockerfile
index f9c9723..e13cd3f 100644
--- a/kong_2/Dockerfile
+++ b/kong_2/Dockerfile
@@ -1,53 +1,43 @@
-FROM ubuntu:jammy
+FROM alpine:3.18
-ARG ASSET=ce
-ENV ASSET $ASSET
+ARG KONG_VERSION=2.8.5
+ENV KONG_VERSION $KONG_VERSION
-ARG EE_PORTS
+ARG KONG_AMD64_SHA="22a5cd7c981ec15b34db105aabac7815bd589380a8d27d0c9e138657a9da6332"
-COPY kong.deb /tmp/kong.deb
+ARG KONG_PREFIX=/usr/local/kong
+ENV KONG_PREFIX $KONG_PREFIX
-ARG KONG_VERSION=2.8.5
-ENV KONG_VERSION $KONG_VERSION
+ARG ASSET=remote
+ARG EE_PORTS
-ARG KONG_AMD64_SHA="efba2bb8b1cb567bc90cc371e80503c558cbc74377b34609552ae2273def3fe3"
-ARG KONG_ARM64_SHA="4fff44f9a0c7b06469591b7d1499a99a100109bc3f08dc412dd0eb38ff383d35"
+COPY kong.tar.gz /tmp/kong.tar.gz
-# hadolint ignore=DL3015
RUN set -ex; \
- arch=$(dpkg --print-architecture); \
major_minor="$(echo "${KONG_VERSION%.*}" | tr -d '.')"; \
- case "${arch}" in \
- amd64) KONG_SHA256=$KONG_AMD64_SHA ;; \
- arm64) KONG_SHA256=$KONG_ARM64_SHA ;; \
- esac; \
- apt-get update \
- && if [ "$ASSET" = "ce" ] ; then \
- CODENAME=$(grep -m1 VERSION_CODENAME /etc/os-release | cut -d = -f 2); \
- apt-get install -y curl \
- && curl -fL "https://packages.konghq.com/public/gateway-${major_minor}/deb/ubuntu/pool/${CODENAME}/main/k/ko/kong_${KONG_VERSION}/kong_${KONG_VERSION}_${arch}.deb" -o /tmp/kong.deb \
- && apt-get purge -y curl \
- && echo "$KONG_SHA256 /tmp/kong.deb" | sha256sum -c -; \
- else \
- # this needs to stay inside this "else" block so that it does not become part of the "official images" builds (https://github.com/docker-library/official-images/pull/11532#issuecomment-996219700)
- apt-get upgrade -y ; \
+ KONG_SHA256=$KONG_AMD64_SHA ; \
+ apk add --no-cache curl bash ca-certificates; \
+ if [ "$ASSET" = "remote" ] ; then \
+ curl -fL "https://packages.konghq.com/public/gateway-${major_minor}/alpine/any-version/main/x86_64/kong-${KONG_VERSION}.apk" -o /tmp/kong.tar.gz \
+ && echo "$KONG_SHA256 /tmp/kong.tar.gz" | sha256sum -c -; \
fi \
- && apt-get install -y --no-install-recommends unzip git \
- # Please update the ubuntu install docs if the below line is changed so that
- # end users can properly install Kong along with its required dependencies
- # and that our CI does not diverge from our docs.
- && apt install --yes /tmp/kong.deb luarocks\
- && rm -rf /var/lib/apt/lists/* \
- && rm -rf /tmp/kong.deb \
+ && apk add --no-cache --virtual .build-deps tar gzip \
+ && tar -C / -xzf /tmp/kong.tar.gz \
+ && apk add --no-cache libstdc++ libgcc openssl pcre perl tzdata libcap zlib zlib-dev bash luarocks yaml \
+ && adduser -S kong \
+ && addgroup -S kong \
+ && mkdir -p "${KONG_PREFIX}" \
+ && chown -R kong:0 ${KONG_PREFIX} \
&& chown kong:0 /usr/local/bin/kong \
- && chown -R kong:0 /usr/local/kong \
+ && chmod -R g=u ${KONG_PREFIX} \
+ && rm -rf /tmp/kong.tar.gz \
&& ln -sf /usr/local/openresty/bin/resty /usr/local/bin/resty \
&& ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/luajit \
&& ln -sf /usr/local/openresty/luajit/bin/luajit /usr/local/bin/lua \
&& ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/local/bin/nginx \
- && if [ "$ASSET" = "ce" ] ; then \
- kong version ; \
- fi
+ && ln -sf /usr/local/lib/luarocks/*/luarocks/*/bin/luarocks-admin /usr/local/bin/luarocks-admin \
+ && apk del .build-deps \
+ && kong version
COPY docker-entrypoint.sh /docker-entrypoint.sh
diff --git a/_bashbrew.err b/kong_2/kong.tar.gz
similarity index 100%
copy from _bashbrew.err
copy to kong_2/kong.tar.gz Relevant Maintainers:
|
There was some confusion during the release of kong 2.8.5. While on the 3.x series we no longer maintain Alpine, it is still maintained in 2.x
As such, this PR reinstates Alpine as the head for 2.8.x.
The change in the Ubuntu SHA is due to the fact that we had to add a new commit to the branch in order to rebuild alpine. The ubuntu files are otherwise unchanged