From d13139b446b274ea0a7cd7e4e4571f20bdf50651 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 27 Feb 2024 12:46:44 +0100 Subject: [PATCH] [bitnami/kong] Release 3.6.0-debian-12-r1 (#63426) Signed-off-by: Bitnami Containers --- bitnami/kong/3/debian-12/Dockerfile | 4 +-- .../rootfs/opt/bitnami/scripts/kong-env.sh | 1 + .../opt/bitnami/scripts/kong/entrypoint.sh | 3 ++ .../opt/bitnami/scripts/kong/postunpack.sh | 7 ++++- bitnami/kong/README.md | 29 ++++++++++--------- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/bitnami/kong/3/debian-12/Dockerfile b/bitnami/kong/3/debian-12/Dockerfile index 9d4babe0a1ce..7116ebaba3c2 100644 --- a/bitnami/kong/3/debian-12/Dockerfile +++ b/bitnami/kong/3/debian-12/Dockerfile @@ -7,10 +7,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-02-26T14:42:16Z" \ + org.opencontainers.image.created="2024-02-27T11:27:13Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="3.6.0-debian-12-r0" \ + org.opencontainers.image.ref.name="3.6.0-debian-12-r1" \ org.opencontainers.image.title="kong" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="3.6.0" diff --git a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong-env.sh b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong-env.sh index 3c93fb2c1275..55616a611691 100644 --- a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong-env.sh +++ b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong-env.sh @@ -62,6 +62,7 @@ export KONG_CONF_FILE="${KONG_CONF_DIR}/kong.conf" export KONG_DEFAULT_CONF_FILE="${KONG_CONF_DIR}/kong.conf.default" export KONG_INITSCRIPTS_DIR="/docker-entrypoint-initdb.d" export KONG_SERVER_DIR="${KONG_BASE_DIR}/server" +export KONG_DEFAULT_SERVER_DIR="${KONG_BASE_DIR}/server.default" export KONG_LOGS_DIR="${KONG_BASE_DIR}/logs" export PATH="${KONG_BASE_DIR}/bin:${KONG_BASE_DIR}/openresty/bin:${KONG_BASE_DIR}/openresty/nginx/sbin:${KONG_BASE_DIR}/luarocks/bin:${PATH}" diff --git a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/entrypoint.sh b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/entrypoint.sh index 572cabec7cc5..250ba6c1d511 100755 --- a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/entrypoint.sh +++ b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/entrypoint.sh @@ -24,6 +24,9 @@ print_welcome_page debug "Copying files from $KONG_DEFAULT_CONF_DIR to $KONG_CONF_DIR" cp -nr "$KONG_DEFAULT_CONF_DIR"/. "$KONG_CONF_DIR" +if ! is_dir_empty "$KONG_DEFAULT_SERVER_DIR"; then + cp -nr "$KONG_DEFAULT_SERVER_DIR"/. "$KONG_SERVER_DIR" +fi if [[ "$*" = *"/opt/bitnami/scripts/kong/run.sh"* ]]; then info "** Starting Kong setup **" /opt/bitnami/scripts/kong/setup.sh diff --git a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/postunpack.sh b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/postunpack.sh index 1ef2e7628152..ee28fd9c4c9f 100755 --- a/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/postunpack.sh +++ b/bitnami/kong/3/debian-12/rootfs/opt/bitnami/scripts/kong/postunpack.sh @@ -23,6 +23,7 @@ ensure_dir_exists "$KONG_LOGS_DIR" ensure_dir_exists "$KONG_SERVER_DIR" ensure_dir_exists "$KONG_INITSCRIPTS_DIR" ensure_dir_exists "$KONG_DEFAULT_CONF_DIR" +ensure_dir_exists "$KONG_DEFAULT_SERVER_DIR" chmod -R g+rwX "$KONG_SERVER_DIR" "$KONG_CONF_DIR" "$KONG_BASE_DIR" # Copy configuration file and set default values cp "$KONG_DEFAULT_CONF_FILE" "$KONG_CONF_FILE" @@ -35,4 +36,8 @@ configure_lua_paths "/opt/bitnami/scripts/kong-env.sh" "/etc/bash.bashrc" # Copy all initially generated configuration files to the default directory # (this is to avoid breaking when entrypoint is being overridden) -cp -r "${KONG_CONF_DIR}/"* "$KONG_DEFAULT_CONF_DIR" \ No newline at end of file +cp -r "${KONG_CONF_DIR}/"* "$KONG_DEFAULT_CONF_DIR" + +if ! is_dir_empty "$KONG_SERVER_DIR"; then + cp -r "$KONG_SERVER_DIR"/* "$KONG_DEFAULT_SERVER_DIR" +fi \ No newline at end of file diff --git a/bitnami/kong/README.md b/bitnami/kong/README.md index 6c5230de067f..9555d9f56d56 100644 --- a/bitnami/kong/README.md +++ b/bitnami/kong/README.md @@ -111,20 +111,21 @@ We can launch another containers using the same flag (`--network NETWORK`) in th #### Read-only environment variables -| Name | Description | Value | -|--------------------------|-----------------------------------------------------|--------------------------------------| -| `KONG_BASE_DIR` | Kong installation directory. | `${BITNAMI_ROOT_DIR}/kong` | -| `KONG_PREFIX` | Kong installation directory. | `${KONG_BASE_DIR}` | -| `KONG_CONF_DIR` | Kong configuration directory. | `${KONG_BASE_DIR}/conf` | -| `KONG_DEFAULT_CONF_DIR` | Kong configuration directory. | `${KONG_BASE_DIR}/conf.default` | -| `KONG_CONF_FILE` | Kong configuration file. | `${KONG_CONF_DIR}/kong.conf` | -| `KONG_DEFAULT_CONF_FILE` | Kong default configuration file. | `${KONG_CONF_DIR}/kong.conf.default` | -| `KONG_INITSCRIPTS_DIR` | Kong directory for init scripts. | `/docker-entrypoint-initdb.d` | -| `KONG_SERVER_DIR` | Directory where Kong Openresty instance is created. | `${KONG_BASE_DIR}/server` | -| `KONG_LOGS_DIR` | Directory where Kong logs are stored. | `${KONG_BASE_DIR}/logs` | -| `KONG_PID_FILE` | Path to the PID file for Kong. | `${KONG_SERVER_DIR}/pids/nginx.pid` | -| `KONG_DAEMON_USER` | Kong system user. | `kong` | -| `KONG_DAEMON_GROUP` | Kong system group. | `kong` | +| Name | Description | Value | +|---------------------------|-------------------------------------------------------|--------------------------------------| +| `KONG_BASE_DIR` | Kong installation directory. | `${BITNAMI_ROOT_DIR}/kong` | +| `KONG_PREFIX` | Kong installation directory. | `${KONG_BASE_DIR}` | +| `KONG_CONF_DIR` | Kong configuration directory. | `${KONG_BASE_DIR}/conf` | +| `KONG_DEFAULT_CONF_DIR` | Kong configuration directory. | `${KONG_BASE_DIR}/conf.default` | +| `KONG_CONF_FILE` | Kong configuration file. | `${KONG_CONF_DIR}/kong.conf` | +| `KONG_DEFAULT_CONF_FILE` | Kong default configuration file. | `${KONG_CONF_DIR}/kong.conf.default` | +| `KONG_INITSCRIPTS_DIR` | Kong directory for init scripts. | `/docker-entrypoint-initdb.d` | +| `KONG_SERVER_DIR` | Directory where Kong Openresty instance is created. | `${KONG_BASE_DIR}/server` | +| `KONG_DEFAULT_SERVER_DIR` | Directory with default Kong Openresty instance files. | `${KONG_BASE_DIR}/server.default` | +| `KONG_LOGS_DIR` | Directory where Kong logs are stored. | `${KONG_BASE_DIR}/logs` | +| `KONG_PID_FILE` | Path to the PID file for Kong. | `${KONG_SERVER_DIR}/pids/nginx.pid` | +| `KONG_DAEMON_USER` | Kong system user. | `kong` | +| `KONG_DAEMON_GROUP` | Kong system group. | `kong` | Additionally, this container also supports configuring Kong via environment values starting with `KONG_`. For instance, by setting the `KONG_LOG_LEVEL` environment variable, Kong will take into account this value rather than the property set in `kong.conf`. It is recommended to set the following environment variables: