-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "chore(*): make this repo a thin wrapper of Kong docker images" (
#663)
- Loading branch information
Showing
14 changed files
with
550 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,50 @@ | ||
# When you update this file substantially, please update build_your_own_images.md as well. | ||
FROM kong/kong:3.3.0-alpine@sha256:56499004203a618ab19aceca85e6611d3baba731b9577da27dee6bb6c8187cf5 | ||
FROM alpine:3.17 | ||
|
||
LABEL maintainer="Kong Docker Maintainers <[email protected]> (@team-gateway-bot)" | ||
|
||
ARG KONG_VERSION=3.3.0 | ||
ENV KONG_VERSION $KONG_VERSION | ||
|
||
ARG KONG_AMD64_SHA="494522d5ef9baf674272bbb7075e406a4515a7475253fd3026cc7ca9451612a2" | ||
|
||
ARG KONG_PREFIX=/usr/local/kong | ||
ENV KONG_PREFIX $KONG_PREFIX | ||
|
||
ARG ASSET=remote | ||
ARG EE_PORTS | ||
|
||
RUN kong version | ||
COPY kong.apk.tar.gz /tmp/kong.apk.tar.gz | ||
|
||
RUN set -ex; \ | ||
apk add --virtual .build-deps curl tar gzip ca-certificates; \ | ||
export ARCH='amd64'; \ | ||
KONG_SHA256=$KONG_AMD64_SHA ; \ | ||
if [ "$ASSET" = "remote" ] ; then \ | ||
curl -fL "https://download.konghq.com/gateway-${KONG_VERSION%%.*}.x-alpine/kong-${KONG_VERSION}.${ARCH}.apk.tar.gz" -o /tmp/kong.apk.tar.gz \ | ||
&& echo "$KONG_SHA256 /tmp/kong.apk.tar.gz" | sha256sum -c -; \ | ||
fi \ | ||
&& tar -C / -xzf /tmp/kong.apk.tar.gz \ | ||
&& apk add --no-cache libstdc++ libgcc perl tzdata libcap zlib zlib-dev bash yaml \ | ||
&& adduser -S kong \ | ||
&& addgroup -S kong \ | ||
&& mkdir -p "${KONG_PREFIX}" \ | ||
&& chown -R kong:0 ${KONG_PREFIX} \ | ||
&& chown kong:0 /usr/local/bin/kong \ | ||
&& chmod -R g=u ${KONG_PREFIX} \ | ||
&& rm -rf /tmp/kong.apk.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 \ | ||
&& apk del .build-deps \ | ||
&& kong version | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
USER kong | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 8000 8443 8001 8444 $EE_PORTS | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,53 @@ | ||
# When you update this file substantially, please update build_your_own_images.md as well. | ||
FROM kong/kong:3.3.0-ubuntu@sha256:b476a8eacb0025fea9b7d3220990eb9b785c2ff24ef5f84f8bb2c0fbcb17254d | ||
FROM debian:bullseye-20230502-slim | ||
|
||
LABEL maintainer="Kong Docker Maintainers <[email protected]> (@team-gateway-bot)" | ||
|
||
ARG KONG_VERSION=3.3.0 | ||
ENV KONG_VERSION $KONG_VERSION | ||
|
||
ARG KONG_SHA256="2fcfaa2095d2eb9dc91820f2f5f0e623b0b8a7457ddcb6ddf5761f4cb02d14e9" | ||
|
||
ARG KONG_PREFIX=/usr/local/kong | ||
ENV KONG_PREFIX $KONG_PREFIX | ||
|
||
ARG ASSET=remote | ||
ARG EE_PORTS | ||
|
||
RUN kong version | ||
COPY kong.deb /tmp/kong.deb | ||
|
||
RUN set -ex; \ | ||
apt-get update; \ | ||
apt-get install -y curl; \ | ||
if [ "$ASSET" = "remote" ] ; then \ | ||
CODENAME=$(cat /etc/os-release | grep VERSION_CODENAME | cut -d = -f 2) \ | ||
&& DOWNLOAD_URL="https://download.konghq.com/gateway-${KONG_VERSION%%.*}.x-debian-${CODENAME}/pool/all/k/kong/kong_${KONG_VERSION}_amd64.deb" \ | ||
&& curl -fL $DOWNLOAD_URL -o /tmp/kong.deb \ | ||
&& echo "$KONG_SHA256 /tmp/kong.deb" | sha256sum -c -; \ | ||
fi \ | ||
&& apt-get update \ | ||
&& apt-get install --yes /tmp/kong.deb \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm -rf /tmp/kong.deb \ | ||
&& chown kong:0 /usr/local/bin/kong \ | ||
&& chown -R kong:0 ${KONG_PREFIX} \ | ||
&& 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 \ | ||
&& kong version \ | ||
&& apt-get purge curl -y | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
USER kong | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 8000 8443 8001 8444 $EE_PORTS | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
HEALTHCHECK --interval=60s --timeout=10s --retries=10 CMD kong-health | ||
|
||
CMD ["kong", "docker-start"] | ||
CMD ["kong", "docker-start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,73 @@ | ||
# When you update this file substantially, please update build_your_own_images.md as well. | ||
FROM kong/kong:3.3.0-rhel@sha256:f606d839f607634f89adbcd8d701912c8a0b7195dd60940a03b70bfb59e90d11 | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7@sha256:6910799b75ad41f00891978575a0d955be2f800c51b955af73926e7ab59a41c3 | ||
|
||
LABEL maintainer="Kong Docker Maintainers <[email protected]> (@team-gateway-bot)" | ||
|
||
ARG KONG_VERSION=3.3.0 | ||
ENV KONG_VERSION $KONG_VERSION | ||
|
||
# RedHat required labels | ||
LABEL name="Kong" \ | ||
vendor="Kong" \ | ||
version="$KONG_VERSION" \ | ||
release="1" \ | ||
url="https://konghq.com" \ | ||
summary="Next-Generation API Platform for Modern Architectures" \ | ||
description="Next-Generation API Platform for Modern Architectures" | ||
|
||
# RedHat required LICENSE file approved path | ||
COPY LICENSE /licenses/ | ||
|
||
ARG KONG_SHA256="d5aef8421e962b97bb734bacb443ddf40733acfad61bf3cf97611619c348b2f6" | ||
|
||
ARG KONG_PREFIX=/usr/local/kong | ||
ENV KONG_PREFIX $KONG_PREFIX | ||
|
||
ARG ASSET=remote | ||
ARG EE_PORTS | ||
|
||
RUN kong version | ||
COPY kong.rpm /tmp/kong.rpm | ||
|
||
# hadolint ignore=DL3015 | ||
RUN set -ex; \ | ||
if [ "$ASSET" = "remote" ] ; then \ | ||
DOWNLOAD_URL="https://download.konghq.com/gateway-${KONG_VERSION%%.*}.x-rhel-8/Packages/k/kong-$KONG_VERSION.rhel8.amd64.rpm" \ | ||
&& curl -fL $DOWNLOAD_URL -o /tmp/kong.rpm \ | ||
&& echo "$KONG_SHA256 /tmp/kong.rpm" | sha256sum -c - \ | ||
|| exit 1; \ | ||
fi \ | ||
# findutils provides xargs (temporarily) | ||
&& microdnf install --assumeyes --nodocs \ | ||
findutils \ | ||
shadow-utils \ | ||
unzip \ | ||
&& rpm -qpR /tmp/kong.rpm \ | ||
| grep -v rpmlib \ | ||
| xargs -n1 -t microdnf install --assumeyes --nodocs \ | ||
# Please update the rhel 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. | ||
&& rpm -iv /tmp/kong.rpm \ | ||
&& microdnf -y clean all \ | ||
&& rm /tmp/kong.rpm \ | ||
&& chown kong:0 /usr/local/bin/kong \ | ||
&& chown -R kong:0 ${KONG_PREFIX} \ | ||
&& 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 \ | ||
&& kong version | ||
|
||
COPY docker-entrypoint.sh /docker-entrypoint.sh | ||
|
||
USER kong | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 8000 8443 8001 8444 $EE_PORTS | ||
|
||
STOPSIGNAL SIGQUIT | ||
|
||
HEALTHCHECK --interval=60s --timeout=10s --retries=10 CMD kong-health | ||
|
||
CMD ["kong", "docker-start"] | ||
CMD ["kong", "docker-start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.