diff --git a/bitnami/kong/2/debian-11/Dockerfile b/bitnami/kong/2/debian-11/Dockerfile index 5954db545b33..e5cf677b9a0b 100644 --- a/bitnami/kong/2/debian-11/Dockerfile +++ b/bitnami/kong/2/debian-11/Dockerfile @@ -6,7 +6,7 @@ ENV HOME="/" \ LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \ org.opencontainers.image.description="Application packaged by Bitnami" \ - org.opencontainers.image.ref.name="2.8.1-debian-11-r42" \ + org.opencontainers.image.ref.name="2.8.1-debian-11-r43" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/kong" \ org.opencontainers.image.title="kong" \ org.opencontainers.image.vendor="VMware, Inc." \ @@ -16,8 +16,20 @@ COPY prebuildfs / SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Install required system packages and dependencies RUN install_packages acl ca-certificates curl gzip libc6 libcrypt1 libgcc-s1 libpcre3 libprotobuf-dev libssl1.1 libyaml-0-2 perl procps tar zlib1g zlib1g-dev -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-154" --checksum e36c3d90f4fbfbe989f40947fa7c8ab817f12fcf97d3aef893c753a20ce976ab -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "kong" "2.8.1-19" --checksum 2c6b277c86614bb25cf83b93da08c19b81b460a01aafd431377b9d31562946c5 +RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ + if [ ! -f gosu-1.14.0-154-linux-amd64-debian-11.tar.gz ]; then \ + curl -SsLf https://downloads.bitnami.com/files/stacksmith/gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -O ; \ + fi && \ + echo "e36c3d90f4fbfbe989f40947fa7c8ab817f12fcf97d3aef893c753a20ce976ab gosu-1.14.0-154-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \ + tar -zxf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ + rm -rf gosu-1.14.0-154-linux-amd64-debian-11.tar.gz +RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ + if [ ! -f kong-2.8.1-20-linux-amd64-debian-11.tar.gz ]; then \ + curl -SsLf https://downloads.bitnami.com/files/stacksmith/kong-2.8.1-20-linux-amd64-debian-11.tar.gz -O ; \ + fi && \ + echo "ee0c2784ae8a8e774a2654c77158c10b996196accae1089478df84f4f494f473 kong-2.8.1-20-linux-amd64-debian-11.tar.gz" | sha256sum -c - && \ + tar -zxf kong-2.8.1-20-linux-amd64-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ + rm -rf kong-2.8.1-20-linux-amd64-debian-11.tar.gz RUN apt-get update && apt-get upgrade -y && \ rm -r /var/lib/apt/lists /var/cache/apt/archives RUN chmod g+rwX /opt/bitnami diff --git a/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index e1421d77e83d..3239077b95ee 100644 --- a/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -8,9 +8,9 @@ }, "kong": { "arch": "amd64", - "digest": "2c6b277c86614bb25cf83b93da08c19b81b460a01aafd431377b9d31562946c5", + "digest": "ee0c2784ae8a8e774a2654c77158c10b996196accae1089478df84f4f494f473", "distro": "debian-11", "type": "NAMI", - "version": "2.8.1-19" + "version": "2.8.1-20" } } \ No newline at end of file diff --git a/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/scripts/libcomponent.sh b/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/scripts/libcomponent.sh deleted file mode 100644 index a7b60696daa6..000000000000 --- a/bitnami/kong/2/debian-11/prebuildfs/opt/bitnami/scripts/libcomponent.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# -# Library for managing Bitnami components - -# Constants -CACHE_ROOT="/tmp/bitnami/pkg/cache" -DOWNLOAD_URL="https://downloads.bitnami.com/files/stacksmith" - -# Functions - -######################## -# Download and unpack a Bitnami package -# Globals: -# OS_NAME -# OS_ARCH -# OS_FLAVOUR -# Arguments: -# $1 - component's name -# $2 - component's version -# Returns: -# None -######################### -component_unpack() { - local name="${1:?name is required}" - local version="${2:?version is required}" - local base_name="${name}-${version}-${OS_NAME}-${OS_ARCH}-${OS_FLAVOUR}" - local package_sha256="" - local directory="/opt/bitnami" - - # Validate arguments - shift 2 - while [ "$#" -gt 0 ]; do - case "$1" in - -c|--checksum) - shift - package_sha256="${1:?missing package checksum}" - ;; - *) - echo "Invalid command line flag $1" >&2 - return 1 - ;; - esac - shift - done - - echo "Downloading $base_name package" - if [ -f "${CACHE_ROOT}/${base_name}.tar.gz" ]; then - echo "${CACHE_ROOT}/${base_name}.tar.gz already exists, skipping download." - cp "${CACHE_ROOT}/${base_name}.tar.gz" . - rm "${CACHE_ROOT}/${base_name}.tar.gz" - if [ -f "${CACHE_ROOT}/${base_name}.tar.gz.sha256" ]; then - echo "Using the local sha256 from ${CACHE_ROOT}/${base_name}.tar.gz.sha256" - package_sha256="$(< "${CACHE_ROOT}/${base_name}.tar.gz.sha256")" - rm "${CACHE_ROOT}/${base_name}.tar.gz.sha256" - fi - else - curl --remote-name --silent --show-error --fail "${DOWNLOAD_URL}/${base_name}.tar.gz" - fi - if [ -n "$package_sha256" ]; then - echo "Verifying package integrity" - echo "$package_sha256 ${base_name}.tar.gz" | sha256sum --check - || return "$?" - fi - tar --directory "${directory}" --extract --gunzip --file "${base_name}.tar.gz" --no-same-owner --strip-components=2 || return "$?" - rm "${base_name}.tar.gz" -} diff --git a/bitnami/kong/README.md b/bitnami/kong/README.md index 5c6bfb651d7d..8d5097cdde1a 100644 --- a/bitnami/kong/README.md +++ b/bitnami/kong/README.md @@ -39,7 +39,7 @@ Non-root container images add an extra layer of security and are generally recom Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/). -* [`2`, `2-debian-11`, `2.8.1`, `2.8.1-debian-11-r42`, `latest` (2/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/kong/2/debian-11/Dockerfile) +* [`2`, `2-debian-11`, `2.8.1`, `2.8.1-debian-11-r43`, `latest` (2/debian-11/Dockerfile)](https://github.com/bitnami/containers/blob/main/bitnami/kong/2/debian-11/Dockerfile) Subscribe to project updates by watching the [bitnami/containers GitHub repo](https://github.com/bitnami/containers). @@ -151,45 +151,10 @@ $ docker logs kong You can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver. -## Understand the structure of this image - -The Bitnami Kong Docker image is built using a Dockerfile with the structure below: - -```Dockerfile -FROM bitnami/minideb - -ENV ... - -## Install required system packages and dependencies -RUN install_packages xxx yyy zzz -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack && component_unpack "kong" "aa.bb.cc-dd" - -COPY rootfs / -ENV ... - -EXPOSE 8080 8443 -ENTRYPOINT [ "/opt/bitnami/scripts/kong/entrypoint.sh" ] -CMD [ "/opt/bitnami/scripts/kong/run.sh" ] -``` - -The Dockerfile has several sections related to: - -- Components installation -- Components static configuration -- Environment variables -- Volumes -- Ports to be exposed -- Working directory and user - - Note that once the user is set to 1001, unprivileged commands cannot be executed any longer. -- Entrypoint and command - - Take into account that these actions are not executed until the container is started. - ## Customize this image The Bitnami Kong Docker image is designed to be extended so it can be used as the base image for your custom API service. -> Note: Read the [previous section](#understand-the-structure-of-this-image) to understand the Dockerfile structure before extending this image. - ### Extend this image Before extending this image, please note it is possible there are certain ways you can configure Kong using the original: