mirror of
https://github.com/bitnami/containers.git
synced 2026-04-02 15:27:45 +08:00
[bitnami/kong] Release 2.8.2-debian-11-r0 (#10457)
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
@@ -4,11 +4,11 @@ ARG TARGETARCH
|
||||
|
||||
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-r61" \
|
||||
org.opencontainers.image.ref.name="2.8.2-debian-11-r0" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/kong" \
|
||||
org.opencontainers.image.title="kong" \
|
||||
org.opencontainers.image.vendor="VMware, Inc." \
|
||||
org.opencontainers.image.version="2.8.1"
|
||||
org.opencontainers.image.version="2.8.2"
|
||||
|
||||
ENV HOME="/" \
|
||||
OS_ARCH="${TARGETARCH:-amd64}" \
|
||||
@@ -22,7 +22,7 @@ RUN install_packages ca-certificates curl libcrypt1 libgcc-s1 libpcre3 libprotob
|
||||
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
COMPONENTS=( \
|
||||
"gosu-1.14.0-155-linux-${OS_ARCH}-debian-11" \
|
||||
"kong-2.8.1-29-linux-${OS_ARCH}-debian-11" \
|
||||
"kong-2.8.2-0-linux-${OS_ARCH}-debian-11" \
|
||||
) && \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
@@ -31,7 +31,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
||||
fi && \
|
||||
sha256sum -c "${COMPONENT}.tar.gz.sha256" && \
|
||||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
||||
rm -rf "${COMPONENT}.tar.gz{,sha256}" ; \
|
||||
rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \
|
||||
done
|
||||
RUN apt-get autoremove --purge -y curl && \
|
||||
apt-get update && apt-get upgrade -y && \
|
||||
@@ -40,7 +40,7 @@ RUN chmod g+rwX /opt/bitnami
|
||||
|
||||
COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/kong/postunpack.sh
|
||||
ENV APP_VERSION="2.8.1" \
|
||||
ENV APP_VERSION="2.8.2" \
|
||||
BITNAMI_APP_NAME="kong" \
|
||||
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"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
version: '2'
|
||||
services:
|
||||
postgresql:
|
||||
image: docker.io/bitnami/postgresql:11
|
||||
image: docker.io/bitnami/postgresql:13
|
||||
volumes:
|
||||
- postgresql_data:/bitnami/postgresql
|
||||
environment:
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
},
|
||||
"kong": {
|
||||
"arch": "amd64",
|
||||
"digest": "d6eb96ee3107a7d6fbf254016ef43a006faf8241c9c4438ace4db039496e92f6",
|
||||
"digest": "c00a0d2f93049da4b4241d2424de6979a687337d6a0c7e0fe96c33fd21667510",
|
||||
"distro": "debian-11",
|
||||
"type": "NAMI",
|
||||
"version": "2.8.1-29"
|
||||
"version": "2.8.2-0"
|
||||
}
|
||||
}
|
||||
@@ -519,7 +519,7 @@ get_machine_id() {
|
||||
get_disk_device_id() {
|
||||
local device_id=""
|
||||
if grep -q ^/dev /proc/mounts; then
|
||||
device_id="$(grep -q ^/dev /proc/mounts | awk '$2 == "/" { print $1 }' | tail -1)"
|
||||
device_id="$(grep ^/dev /proc/mounts | awk '$2 == "/" { print $1 }' | tail -1)"
|
||||
fi
|
||||
# If it could not be autodetected, fallback to /dev/sda1 as a default
|
||||
if [[ -z "$device_id" || ! -b "$device_id" ]]; then
|
||||
@@ -538,7 +538,7 @@ get_disk_device_id() {
|
||||
# Root disk ID
|
||||
#########################
|
||||
get_root_disk_device_id() {
|
||||
get_disk_device_id | sed 's/[0-9]\+$//'
|
||||
get_disk_device_id | sed -E 's/p?[0-9]+$//'
|
||||
}
|
||||
|
||||
########################
|
||||
|
||||
@@ -36,7 +36,6 @@ kong_env_vars=(
|
||||
KONG_ADMIN_LISTEN
|
||||
KONG_ADMIN_LISTEN_OVERRIDE
|
||||
KONG_DATABASE
|
||||
KONG_CASSANDRA_PASSWORD
|
||||
KONG_PG_PASSWORD
|
||||
)
|
||||
for env_var in "${kong_env_vars[@]}"; do
|
||||
@@ -85,7 +84,6 @@ export KONG_PROXY_LISTEN_OVERRIDE="${KONG_PROXY_LISTEN_OVERRIDE:-no}"
|
||||
export KONG_ADMIN_LISTEN="${KONG_ADMIN_LISTEN:-${KONG_ADMIN_LISTEN_ADDRESS}:${KONG_ADMIN_HTTP_PORT_NUMBER}, ${KONG_ADMIN_LISTEN_ADDRESS}:${KONG_ADMIN_HTTPS_PORT_NUMBER} ssl}"
|
||||
export KONG_ADMIN_LISTEN_OVERRIDE="${KONG_ADMIN_LISTEN_OVERRIDE:-no}"
|
||||
export KONG_DATABASE="${KONG_DATABASE:-postgres}"
|
||||
export KONG_CASSANDRA_PASSWORD="${KONG_CASSANDRA_PASSWORD:-}"
|
||||
export KONG_PG_PASSWORD="${KONG_PG_PASSWORD:-}"
|
||||
|
||||
# Custom environment variables may be defined below
|
||||
|
||||
@@ -27,3 +27,7 @@ kong_conf_set nginx_daemon off
|
||||
kong_conf_set lua_package_path
|
||||
kong_conf_set nginx_user
|
||||
kong_configure_non_empty_values
|
||||
if [ "$(get_kong_major_version)" = "3" ]; then
|
||||
# Link opentelemetry files to the expected location
|
||||
install_opentelemetry
|
||||
fi
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
. /opt/bitnami/scripts/libos.sh
|
||||
. /opt/bitnami/scripts/libservice.sh
|
||||
. /opt/bitnami/scripts/libvalidations.sh
|
||||
. /opt/bitnami/scripts/libversion.sh
|
||||
|
||||
########################
|
||||
# Validate settings in KONG_* environment variables
|
||||
@@ -78,21 +79,10 @@ kong_validate() {
|
||||
# PostgreSQL is the default database type
|
||||
check_password_file KONG_POSTGRESQL_PASSWORD_FILE
|
||||
[[ -n "${KONG_PG_HOST:-}" ]] && check_resolved_hostname "${KONG_PG_HOST:-}"
|
||||
if [[ -n "${!KONG_CASSANDRA_@}" ]]; then
|
||||
warn "KONG_DATABASE is empty or set to 'postgres', so the following environment variables will be ignored: ${!KONG_CASSANDRA_@}"
|
||||
fi
|
||||
elif [[ "${KONG_DATABASE:-}" = "cassandra" ]]; then
|
||||
check_password_file KONG_CASSANDRA_PASSWORD_FILE
|
||||
for cassandra_contact_point in $(echo "${CASSANDRA_CONTACT_POINTS:-}" | sed -r 's/[, ]+/\n/'); do
|
||||
check_resolved_hostname "${cassandra_contact_point}"
|
||||
done
|
||||
if [[ -n "${!KONG_PG_@}" ]]; then
|
||||
warn "KONG_DATABASE is set to 'cassandra', so the following environment variables will be ignored: ${!KONG_PG_@}"
|
||||
fi
|
||||
elif [[ "${KONG_DATABASE:-}" = "off" ]]; then
|
||||
warn "KONG_DATABASE is set to 'off', Kong will run but data will not be persisted"
|
||||
else
|
||||
print_validation_error "Wrong value '${KONG_DATABASE}' passed to KONG_DATABASE. Valid values: 'off', 'cassandra', 'postgres'"
|
||||
print_validation_error "Wrong value '${KONG_DATABASE}' passed to KONG_DATABASE. Valid values: 'off', 'postgres'"
|
||||
fi
|
||||
|
||||
# Listen addresses and port validations
|
||||
@@ -332,3 +322,48 @@ kong_custom_init_scripts() {
|
||||
info "No custom scripts in $KONG_INITSCRIPTS_DIR"
|
||||
fi
|
||||
}
|
||||
########################
|
||||
# Find the path to the opentelemetry include files
|
||||
# Globals:
|
||||
# KONG_*
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# Path to opentelemetry include dir
|
||||
#########################
|
||||
find_opentelemetry_source() {
|
||||
local path
|
||||
path="$(find "$KONG_BASE_DIR" -name "opentelemetry" -print | grep "include")"
|
||||
echo "$path"
|
||||
}
|
||||
|
||||
########################
|
||||
# Installs opentelemetry plugin
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
install_opentelemetry() {
|
||||
local -r sourceDir="$(find_opentelemetry_source)"
|
||||
local -r destinationDir="/usr/local/kong/include"
|
||||
mkdir -p "$destinationDir"
|
||||
ln -s "$sourceDir" "${destinationDir}/opentelemetry"
|
||||
}
|
||||
|
||||
########################
|
||||
# Returns kong major version
|
||||
# Globals:
|
||||
# None
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
# None
|
||||
#########################
|
||||
get_kong_major_version() {
|
||||
kong_version="$("${KONG_BASE_DIR}/bin/kong" version)"
|
||||
major_version="$(get_sematic_version "$kong_version" 1)"
|
||||
echo "${major_version:-0}"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
rolling-tags:
|
||||
- "2"
|
||||
- "2-debian-11"
|
||||
- "2.8.1"
|
||||
- "latest"
|
||||
- "2.8.2"
|
||||
|
||||
@@ -258,7 +258,7 @@ $ docker run --name kong bitnami/kong:latest
|
||||
|
||||
## Contributing
|
||||
|
||||
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/containers/issues), or submit a [pull request](https://github.com/bitnami/containers/pulls) with your contribution.
|
||||
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/containers/issues) or submitting a [pull request](https://github.com/bitnami/containers/pulls) with your contribution.
|
||||
|
||||
## Issues
|
||||
|
||||
|
||||
Reference in New Issue
Block a user