[bitnami/kong] Release 3.1.1-debian-11-r18 (#20538)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot
2023-01-17 11:08:29 +01:00
committed by GitHub
parent ec96d433e6
commit 7b8a1a7769
5 changed files with 33 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ ARG TARGETARCH
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
org.opencontainers.image.description="Application packaged by Bitnami" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="3.1.1-debian-11-r17" \
org.opencontainers.image.ref.name="3.1.1-debian-11-r18" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/kong" \
org.opencontainers.image.title="kong" \
org.opencontainers.image.vendor="VMware, Inc." \
@@ -23,7 +23,7 @@ RUN install_packages ca-certificates curl libcrypt1 libgcc-s1 libprotobuf-dev li
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
COMPONENTS=( \
"gosu-1.16.0-0-linux-${OS_ARCH}-debian-11" \
"kong-3.1.1-4-linux-${OS_ARCH}-debian-11" \
"kong-3.1.1-5-linux-${OS_ARCH}-debian-11" \
) && \
for COMPONENT in "${COMPONENTS[@]}"; do \
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
@@ -43,9 +43,7 @@ COPY rootfs /
RUN /opt/bitnami/scripts/kong/postunpack.sh
ENV APP_VERSION="3.1.1" \
BITNAMI_APP_NAME="kong" \
LUA_CPATH="./?.so;/usr/local/lib/lua/5.1/?.so;/opt/bitnami/kong/openresty/luajit/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so;/opt/bitnami/kong/luarocks/lib/lua/5.1/?.so" \
LUA_PATH="/opt/bitnami/kong/openresty/luajit/share/luajit-?/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/opt/bitnami/kong/openresty/luajit/share/lua/5.1/?.lua;/opt/bitnami/kong/openresty/luajit/share/lua/5.1/?/init.lua;/opt/bitnami/kong/luarocks/share/lua/5.1/?.lua;/opt/bitnami/kong/luarocks/share/lua/5.1/?/init.lua" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/kong/bin:/opt/bitnami/kong/openresty/bin:/opt/bitnami/kong/openresty/luajit/bin:/opt/bitnami/kong/openresty/nginx/sbin:$PATH"
PATH="/opt/bitnami/common/bin:/opt/bitnami/kong/bin:/opt/bitnami/kong/luarocks/bin:/opt/bitnami/kong/openresty/bin:/opt/bitnami/kong/openresty/luajit/bin:/opt/bitnami/kong/openresty/nginx/sbin:$PATH"
EXPOSE 8000 8001 8443 8444

View File

@@ -11,6 +11,6 @@
"digest": "21749c2d3c16465f64f0be9889e3c5b72ea179641fbdd08225b0cb5c3079f854",
"distro": "debian-11",
"type": "NAMI",
"version": "3.1.1-4"
"version": "3.1.1-5"
}
}

View File

@@ -59,7 +59,7 @@ 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_LOGS_DIR="${KONG_SERVER_DIR}/logs"
export PATH="${KONG_BASE_DIR}/bin:${KONG_BASE_DIR}/openresty/bin:${PATH}"
export PATH="${KONG_BASE_DIR}/bin:${KONG_BASE_DIR}/openresty/bin:${KONG_BASE_DIR}/luarocks/bin:${PATH}"
# System users (when running with a privileged user)
export KONG_DAEMON_USER="kong"

View File

@@ -28,4 +28,4 @@ kong_conf_set lua_package_path
kong_conf_set nginx_user
kong_configure_non_empty_values
install_opentelemetry
configure_lua_paths "/opt/bitnami/scripts/kong-env.sh" "/etc/bash.bashrc"

View File

@@ -5,6 +5,7 @@
# shellcheck disable=SC1090,SC1091
# Load generic libraries
. /opt/bitnami/scripts/libfile.sh
. /opt/bitnami/scripts/libfs.sh
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libnet.sh
@@ -347,8 +348,30 @@ find_opentelemetry_source() {
# None
#########################
install_opentelemetry() {
local -r sourceDir="$(find_opentelemetry_source)"
local -r destinationDir="/usr/local/kong/include"
mkdir -p "$destinationDir"
ln -s "$sourceDir" "${destinationDir}/opentelemetry"
local -r source_dir="$(find_opentelemetry_source)"
local -r destination_dir="/usr/local/kong/include"
mkdir -p "$destination_dir"
ln -s "$source_dir" "${destination_dir}/opentelemetry"
}
########################
# Configure LUA_PATH and LUA_CPATH in the required files
# Globals:
# None
# Arguments:
# List of files to include the configuration
# Returns:
# None
#########################
configure_lua_paths() {
local -a dest_files=("${@}")
local -r lua_paths_file="/tmp/lua-paths.sh"
# Skip the PATH environment variable. We are already setting it.
"${KONG_BASE_DIR}/luarocks/bin/luarocks" path > "$lua_paths_file"
remove_in_file "$lua_paths_file" "^export\s+PATH=.*$"
for dest_file in "${dest_files[@]}"; do
echo "# 'luarocks path' configuration" >> "$dest_file"
cat "$lua_paths_file" >> "$dest_file"
done
rm --force "$lua_paths_file"
}