From 9f070cedadaf204689506dcc5a8a3569bcd7ec3a Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 7 Feb 2023 18:04:40 +0100 Subject: [PATCH] [bitnami/openresty] Release 1.21.4-1-debian-11-r86 (#23167) Signed-off-by: Bitnami Containers --- bitnami/openresty/1.21/debian-11/Dockerfile | 7 +++---- .../prebuildfs/opt/bitnami/licenses/licenses.txt | 4 ++-- .../rootfs/opt/bitnami/scripts/openresty-env.sh | 2 ++ .../opt/bitnami/scripts/openresty/postunpack.sh | 13 ++++++++++++- bitnami/openresty/README.md | 9 +++++++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/bitnami/openresty/1.21/debian-11/Dockerfile b/bitnami/openresty/1.21/debian-11/Dockerfile index 5fc7d613515c..687958baf322 100644 --- a/bitnami/openresty/1.21/debian-11/Dockerfile +++ b/bitnami/openresty/1.21/debian-11/Dockerfile @@ -5,13 +5,13 @@ 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="1.21.4-1-debian-11-r85" \ + org.opencontainers.image.ref.name="1.21.4-1-debian-11-r86" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/openresty" \ org.opencontainers.image.title="openresty" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="1.21.4-1" -ENV HOME="/" \ +ENV HOME="/home/openresty" \ OS_ARCH="${TARGETARCH:-amd64}" \ OS_FLAVOUR="debian-11" \ OS_NAME="linux" @@ -34,8 +34,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \ rm -rf "${COMPONENT}".tar.gz{,.sha256} ; \ done -RUN apt-get autoremove --purge -y curl && \ - apt-get update && apt-get upgrade -y && \ +RUN apt-get update && apt-get upgrade -y && \ apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives RUN chmod g+rwX /opt/bitnami diff --git a/bitnami/openresty/1.21/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt b/bitnami/openresty/1.21/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt index c76ba31f3b8a..8373a19703c6 100644 --- a/bitnami/openresty/1.21/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt +++ b/bitnami/openresty/1.21/debian-11/prebuildfs/opt/bitnami/licenses/licenses.txt @@ -1,3 +1,3 @@ -Bitnami containers ship with software bundles. You can find the licenses under: -/opt/bitnami/nami/COPYING +Bitnami containers ship with software bundles. You can find the licenses at: +https://bitnami.com/open-source /opt/bitnami/[name-of-bundle]/licenses/[bundle-version].txt diff --git a/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty-env.sh b/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty-env.sh index 12e2ec0545fb..c241511df66c 100644 --- a/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty-env.sh +++ b/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty-env.sh @@ -47,6 +47,8 @@ export OPENRESTY_HTDOCS_DIR="${OPENRESTY_BASE_DIR}/nginx/html" export OPENRESTY_TMP_DIR="${OPENRESTY_BASE_DIR}/nginx/tmp" export OPENRESTY_LOGS_DIR="${OPENRESTY_BASE_DIR}/nginx/logs" export OPENRESTY_SERVER_BLOCKS_DIR="${OPENRESTY_CONF_DIR}/nginx/server_blocks" +export OPENRESTY_SITE_DIR="${OPENRESTY_BASE_DIR}/site" +export OPM_BASE_DIR="/home/openresty" export OPENRESTY_CONF_FILE="${OPENRESTY_CONF_DIR}/nginx.conf" export OPENRESTY_PID_FILE="${OPENRESTY_TMP_DIR}/nginx.pid" export PATH="${OPENRESTY_BIN_DIR}:${BITNAMI_ROOT_DIR}/common/bin:${PATH}" diff --git a/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty/postunpack.sh b/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty/postunpack.sh index 149e91a72525..682d0d12e4e0 100755 --- a/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty/postunpack.sh +++ b/bitnami/openresty/1.21/debian-11/rootfs/opt/bitnami/scripts/openresty/postunpack.sh @@ -33,7 +33,18 @@ openresty_patch_httpoxy_vulnerability() { . /opt/bitnami/scripts/openresty-env.sh # Ensure non-root user has write permissions on a set of directories -for dir in "$OPENRESTY_VOLUME_DIR" "$OPENRESTY_CONF_DIR" "$OPENRESTY_SERVER_BLOCKS_DIR" "${OPENRESTY_CONF_DIR}/bitnami" "${OPENRESTY_CONF_DIR}/bitnami/certs" "$OPENRESTY_LOGS_DIR" "$OPENRESTY_TMP_DIR"; do +declare -a writable_dirs=( + "$OPENRESTY_VOLUME_DIR" + "$OPENRESTY_CONF_DIR" + "$OPENRESTY_SERVER_BLOCKS_DIR" + "${OPENRESTY_CONF_DIR}/bitnami" + "${OPENRESTY_CONF_DIR}/bitnami/certs" + "$OPENRESTY_LOGS_DIR" + "$OPENRESTY_TMP_DIR" + "$OPENRESTY_SITE_DIR" + "$OPM_BASE_DIR" +) +for dir in "${writable_dirs[@]}"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done diff --git a/bitnami/openresty/README.md b/bitnami/openresty/README.md index e1ebb5fa37f5..d62dd58b5e64 100644 --- a/bitnami/openresty/README.md +++ b/bitnami/openresty/README.md @@ -227,6 +227,15 @@ services: ... ``` +### Adding lua modules + +Openresty uses its own Lua's package manager named `opm`. It is advised to use `opm` [instead of other Lua's package manager like `luarocks`](https://openresty.org/en/using-luarocks.html). You can easily run the `opm` command from the container command-line, or build your custom image by extending Bitnami's: + +```Dockerfile +FROM bitnami/openresty:latest +RUN opm get openresty/lua-resty-lock +``` + ## Reverse proxy to other containers OpenResty can be used to reverse proxy to other containers using Docker's linking system. This is particularly useful if you want to serve dynamic content through an OpenResty frontend. To do so, [add a server block](#adding-custom-server-blocks) like the following in the `/opt/bitnami/openresty/nginx/conf/server_blocks/` folder: