diff --git a/bitnami/openresty/1.21/debian-11/Dockerfile b/bitnami/openresty/1.21/debian-11/Dockerfile index ae5f1d6beb41..19c691edb323 100644 --- a/bitnami/openresty/1.21/debian-11/Dockerfile +++ b/bitnami/openresty/1.21/debian-11/Dockerfile @@ -7,10 +7,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:1e1b4657a77f0d47e9220f0c37b9bf7802581b93214fff7d1bd2364c8bf22e8e" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-12-24T07:45:34Z" \ + org.opencontainers.image.created="2024-01-20T01:10:59Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="1.21.4-3-debian-11-r3" \ + org.opencontainers.image.ref.name="1.21.4-3-debian-11-r4" \ org.opencontainers.image.title="openresty" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="1.21.4-3" @@ -40,6 +40,7 @@ RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ 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 +RUN find / -perm /6000 -type f -exec chmod a-s {} \; || true COPY rootfs / RUN /opt/bitnami/scripts/openresty/postunpack.sh diff --git a/bitnami/openresty/1.21/debian-11/docker-compose.yml b/bitnami/openresty/1.21/debian-11/docker-compose.yml deleted file mode 100644 index a2cc86e59006..000000000000 --- a/bitnami/openresty/1.21/debian-11/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright VMware, Inc. -# SPDX-License-Identifier: APACHE-2.0 - -version: '2' - -services: - openresty: - image: docker.io/bitnami/openresty:1.21 - ports: - - '80:8080' diff --git a/bitnami/openresty/1.21/debian-11/prebuildfs/usr/sbin/run-script b/bitnami/openresty/1.21/debian-11/prebuildfs/usr/sbin/run-script index b7a5bf1e50bf..4ca0f897277e 100755 --- a/bitnami/openresty/1.21/debian-11/prebuildfs/usr/sbin/run-script +++ b/bitnami/openresty/1.21/debian-11/prebuildfs/usr/sbin/run-script @@ -10,7 +10,7 @@ fi script=$1 exit_code="${2:-96}" -fail_if_not_present="${3:-y}" +fail_if_not_present="${3:-n}" if test -f "$script"; then sh $script diff --git a/bitnami/openresty/README.md b/bitnami/openresty/README.md index 8748cc5824a1..b0384a0ad6e7 100644 --- a/bitnami/openresty/README.md +++ b/bitnami/openresty/README.md @@ -13,11 +13,6 @@ Trademarks: This software listing is packaged by Bitnami. The respective tradema docker run --name openresty bitnami/openresty:latest ``` -```console -curl -sSL https://raw.githubusercontent.com/bitnami/containers/main/bitnami/openresty/docker-compose.yml > docker-compose.yml -docker-compose up -d -``` - ## Why use Bitnami Images? * Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems. @@ -73,17 +68,6 @@ This OpenResty image exposes a volume at `/app`. Content mounted here is served docker run -v /path/to/app:/app bitnami/openresty:latest ``` -or by modifying the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/openresty/docker-compose.yml) file present in this repository: - -```yaml -services: - openresty: - ... - volumes: - - /path/to/app:/app - ... -``` - ## Accessing your server from the host To access your web server from your host machine you can ask Docker to map a random port on your host to ports `8080` and `8443` exposed in the container. @@ -109,6 +93,36 @@ Access your web server in the browser by navigating to `http://localhost:9000`. ## Configuration +### Environment variables + +#### Customizable environment variables + +| Name | Description | Default Value | +|-------------------------------|----------------------------------------------------------------------|---------------| +| `OPENRESTY_FORCE_INITSCRIPTS` | Force the init scripts running even if it is not in the first start. | `false` | + +#### Read-only environment variables + +| Name | Description | Value | +|---------------------------------------|--------------------------------------------------------------|---------------------------------------------| +| `OPENRESTY_BASE_DIR` | OpenResty installation directory. | `${BITNAMI_ROOT_DIR}/openresty` | +| `OPENRESTY_VOLUME_DIR` | OpenResty directory for mounted files. | `${BITNAMI_VOLUME_DIR}/openresty` | +| `OPENRESTY_BIN_DIR` | OpenResty directory for binary executables. | `${OPENRESTY_BASE_DIR}/bin` | +| `OPENRESTY_CONF_DIR` | OpenResty configuration directory. | `${OPENRESTY_BASE_DIR}/nginx/conf` | +| `OPENRESTY_HTDOCS_DIR` | Directory containing HTTP files to serve via OpenResty. | `${OPENRESTY_BASE_DIR}/nginx/html` | +| `OPENRESTY_TMP_DIR` | OpenResty directory for runtime temporary files. | `${OPENRESTY_BASE_DIR}/nginx/tmp` | +| `OPENRESTY_LOGS_DIR` | OpenResty directory for logs. | `${OPENRESTY_BASE_DIR}/nginx/logs` | +| `OPENRESTY_SERVER_BLOCKS_DIR` | OpenResty directory for virtual hosts. | `${OPENRESTY_CONF_DIR}/nginx/server_blocks` | +| `OPENRESTY_SITE_DIR` | OpenResty directory for installing Lua packages. | `${OPENRESTY_BASE_DIR}/site` | +| `OPENRESTY_INITSCRIPTS_DIR` | OpenResty init scripts directory. | `/docker-entrypoint-initdb.d` | +| `OPM_BASE_DIR` | OpenResty package manager base directory. | `/home/openresty` | +| `OPENRESTY_CONF_FILE` | Path to the OpenResty configuration. | `${OPENRESTY_CONF_DIR}/nginx.conf` | +| `OPENRESTY_PID_FILE` | Path to the OpenResty PID file. | `${OPENRESTY_TMP_DIR}/nginx.pid` | +| `OPENRESTY_DAEMON_USER` | OpenResty system user. | `daemon` | +| `OPENRESTY_DAEMON_GROUP` | OpenResty system group. | `daemon` | +| `OPENRESTY_DEFAULT_HTTP_PORT_NUMBER` | Default OpenResty HTTP port number to enable at build time. | `8080` | +| `OPENRESTY_DEFAULT_HTTPS_PORT_NUMBER` | Default OpenResty HTTPS port number to enable at build time. | `8443` | + ### Initializing a new instance When the container is executed for the first time, it will execute the files with extensions `.sh` located at `/docker-entrypoint-initdb.d`. @@ -140,17 +154,6 @@ docker run --name openresty \ bitnami/openresty:latest ``` -or by modifying the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/openresty/docker-compose.yml) file present in this repository: - -```yaml -services: - openresty: - ... - volumes: - - /path/to/my_server_block.conf:/opt/bitnami/openresty/nginx/conf/server_blocks/my_server_block.conf:ro - ... -``` - ### Using custom SSL certificates *NOTE:* The steps below assume that you are using a custom domain name and that you have already configured the custom domain name to point to your server. @@ -200,18 +203,6 @@ docker run --name openresty \ bitnami/openresty:latest ``` -or by modifying the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/openresty/docker-compose.yml) file present in this repository: - -```yaml -services: - openresty: - ... - volumes: - - /path/to/openresty-persistence/certs:/certs - - /path/to/my_server_block.conf:/opt/bitnami/openresty/nginx/conf/server_blocks/my_server_block.conf:ro - ... -``` - ### Full configuration The image looks for configurations in `/opt/bitnami/openresty/nginx/conf/nginx.conf`. You can overwrite the `nginx.conf` file using your own custom configuration file. @@ -222,17 +213,6 @@ docker run --name openresty \ bitnami/openresty:latest ``` -or by modifying the [`docker-compose.yml`](https://github.com/bitnami/containers/blob/main/bitnami/openresty/docker-compose.yml) file present in this repository: - -```yaml -services: - openresty: - ... - volumes: - - /path/to/your_nginx.conf:/opt/bitnami/openresty/nginx/conf/nginx.conf:ro - ... -``` - ### 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: @@ -278,12 +258,6 @@ The Bitnami OpenResty Docker image sends the container logs to the `stdout`. To docker logs openresty ``` -or using Docker Compose: - -```console -docker-compose logs openresty -``` - 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. ## Customize this image @@ -336,40 +310,6 @@ EXPOSE 8181 8143 USER 1002 ``` -Based on the extended image, you can use a Docker Compose file like the one below to add other features: - -* Add a custom server block -* Add custom certificates -* Clone your web application and serve it through OpenResty - -```yaml -version: '2' - -services: - openresty: - build: . - ports: - - '80:8181' - - '443:8443' - depends_on: - - cloner - volumes: - - ./config/my_server_block.conf:/opt/bitnami/openresty/nginx/conf/server_blocks/my_server_block.conf:ro - - ./certs:/certs - - data:/app - cloner: - image: 'bitnami/git:latest' - command: - - clone - - https://github.com/cloudacademy/static-website-example - - /app - volumes: - - data:/app -volumes: - data: - driver: local -``` - ## Maintenance ### Upgrade this image @@ -382,9 +322,6 @@ Bitnami provides up-to-date versions of OpenResty, including security patches, s docker pull bitnami/openresty:latest ``` -or if you're using Docker Compose, update the value of the image property to -`bitnami/openresty:latest`. - #### Step 2: Stop and backup the currently running container Stop the currently running container using the command @@ -393,24 +330,12 @@ Stop the currently running container using the command docker stop openresty ``` -or using Docker Compose: - -```console -docker-compose stop openresty -``` - #### Step 3: Remove the currently running container ```console docker rm -v openresty ``` -or using Docker Compose: - -```console -docker-compose rm -v openresty -``` - #### Step 4: Run the new image Re-create your container from the new image. @@ -419,11 +344,11 @@ Re-create your container from the new image. docker run --name nginx bitnami/openresty:latest ``` -or using Docker Compose: +## Notable Changes -```console -docker-compose up openresty -``` +### Starting January 16, 2024 + +* The `docker-compose.yaml` file has been removed, as it was solely intended for internal testing purposes. ## Contributing