Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rmt-nginx-image for openSUSE:Factory checked in at 2024-06-17 19:33:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rmt-nginx-image (Old) and /work/SRC/openSUSE:Factory/.rmt-nginx-image.new.19518 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rmt-nginx-image" Mon Jun 17 19:33:40 2024 rev:12 rq:1181272 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/rmt-nginx-image/rmt-nginx-image.changes 2024-06-11 18:30:14.494946329 +0200 +++ /work/SRC/openSUSE:Factory/.rmt-nginx-image.new.19518/rmt-nginx-image.changes 2024-06-17 19:33:46.775735196 +0200 @@ -1,0 +2,5 @@ +Mon Jun 17 08:06:22 UTC 2024 - Alexandre Vicenzi <alexandre.vice...@suse.com> + +- Extend README.md + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ Dockerfile ++++++ --- /var/tmp/diff_new_pack.YmRkgc/_old 2024-06-17 19:33:47.423759004 +0200 +++ /var/tmp/diff_new_pack.YmRkgc/_new 2024-06-17 19:33:47.427759151 +0200 @@ -14,8 +14,8 @@ # You can contact the BCI team via https://github.com/SUSE/bci/discussions -#!BuildTag: opensuse/rmt-nginx:%%nginx_version%% -#!BuildTag: opensuse/rmt-nginx:%%nginx_version%%-%RELEASE% +#!BuildTag: opensuse/rmt-nginx:1.27 +#!BuildTag: opensuse/rmt-nginx:1.27-%RELEASE% #!BuildTag: opensuse/rmt-nginx:latest FROM opensuse/tumbleweed:latest @@ -26,22 +26,24 @@ # labelprefix=org.opensuse.application.rmt-nginx LABEL org.opencontainers.image.title="openSUSE Tumbleweed NGINX for SUSE RMT" LABEL org.opencontainers.image.description="NGINX for SUSE RMT container based on the openSUSE Tumbleweed Base Container Image." -LABEL org.opencontainers.image.version="%%nginx_version%%" +LABEL org.opencontainers.image.version="1.27" LABEL org.opencontainers.image.url="https://www.opensuse.org" LABEL org.opencontainers.image.created="%BUILDTIME%" LABEL org.opencontainers.image.vendor="openSUSE Project" LABEL org.opencontainers.image.source="%SOURCEURL%" -LABEL org.opensuse.reference="registry.opensuse.org/opensuse/rmt-nginx:%%nginx_version%%-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/rmt-nginx:1.27-%RELEASE%" LABEL org.openbuildservice.disturl="%DISTURL%" LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime" LABEL org.opensuse.release-stage="released" # endlabelprefix LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/rmt-nginx-image/README.md" -RUN set -euo pipefail; zypper -n in --no-recommends gawk nginx findutils gettext-runtime; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} +RUN set -euo pipefail; zypper -n in --no-recommends gawk nginx findutils envsubst; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] CMD ["nginx", "-g", "daemon off;"] EXPOSE 80 +# sanity check that the version from the tag is equal to the version of nginx that we expect +RUN set -euo pipefail; [ "$(rpm -q --qf '%{version}' nginx | cut -d '.' -f -2)" = "1.27" ] RUN set -euo pipefail; mkdir /docker-entrypoint.d COPY [1-3]0-*.sh /docker-entrypoint.d/ COPY docker-entrypoint.sh /usr/local/bin ++++++ README.md ++++++ --- /var/tmp/diff_new_pack.YmRkgc/_old 2024-06-17 19:33:47.471760768 +0200 +++ /var/tmp/diff_new_pack.YmRkgc/_new 2024-06-17 19:33:47.475760915 +0200 @@ -1,7 +1,91 @@ -# The openSUSE Tumbleweed NGINX for SUSE RMT Container Image +# NGINX for SUSE RMT container image +  -NGINX for SUSE RMT container based on the openSUSE Tumbleweed Base Container Image. +## Description + +nginx (pronounced "engine-x") is an open-source reverse proxy server for the HTTP, HTTPS, SMTP, POP3, and IMAP protocols. nginx can also act as a load balancer, HTTP cache, and a web server (origin server). + +## Usage + +By default, the image launches nginx with the same configuration that comes with the SUSE Linux Enterprise Server. + +```ShellSession +$ podman run -it --rm -p 8080:80 registry.opensuse.org/opensuse/rmt-nginx:1.27 +``` + +Or: + +```ShellSession +$ podman run -it --rm -p 8080:80 -v /path/to/html/:/srv/www/htdocs/:Z registry.opensuse.org/opensuse/rmt-nginx:1.27 +``` + +**Note:** The directory `/srv/www/htdocs/` is the root directory used by the default server. Additional servers can use any other path. + +You can access the served content on http://localhost:8080 or http://host-ip:8080. + +## Using templates + +By default, nginx doesn't support environment variables inside configuration blocks. This image includes a script that can extract environment variables before nginx creates configuration files. + +The script reads `.template` files stored in `/etc/nginx/templates/` and saves the result of the [`envsubst`](https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html) command to the directory `/etc/nginx/conf.d/`. + +For example, if you want nginx to use port 80, create a file named `/etc/nginx/templates/default.conf.template` containing the following variable definition: + +```nginx +listen ${NGINX_PORT}; +``` + +The template above is then rendered to `/etc/nginx/conf.d/default.conf` as follows: + +```nginx +listen 80; +``` + +## Environment variables + +### NGINX_ENTRYPOINT_QUIET_LOGS + +This optional environment variable controls the logging during container startup. Set the value to `1` to silence logs. + +### NGINX_ENTRYPOINT_WORKER_PROCESSES_AUTOTUNE + +This optional environment variable enables a script to autotune the number of worker processes. Set the value to `1` to enable autotune of the worker process parameter (default is disabled). + +### NGINX_ENVSUBST_TEMPLATE_DIR + +This optional environment variable specifies a directory containing template files (default is `/etc/nginx/templates`). + +**Note:** The script ignores template processing if this directory doesn't exist + +### NGINX_ENVSUBST_OUTPUT_DIR + +This optional environment variable specifies a directory for storing results of running [`envsubst`](https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html) on templates (default is `/etc/nginx/conf.d`). + +The output filename is the template filename with the suffix `.template` removed. + +**Note:** Modifying this variable also requires changing the `nginx.conf`, so it recognizes the new directory location. + +### NGINX_ENVSUBST_TEMPLATE_SUFFIX + +This optional environment variable changes the suffix of template files (default is `.template`). + +**Note:** The script only processes files that have the specified suffix in their names. + +### NGINX_ENVSUBST_FILTER + +This optional environment variable enables filtering out variables in the template processing. Environment variables that do not match the regular expression defined by `NGINX_ENVSUBST_FILTER` are not replaced. + +## Configuration scripts + +To use scripts to perform configuration actions, add one or more `*.envsh` or `*.sh` scripts under `/docker-entrypoint.d/`. Any executable `*.envsh` or `*.sh` script found in the directory is executed before starting the service, which can be used to perform further configuration steps. + +Currently, the container image ships with the following helper scripts: + +- `20-envsubst-on-templates.sh` - Enables the use of environment variables in templates. +- `30-tune-worker-processes.sh` - Enables autotuning the number of worker processes. + +**Warning:** The container startup is aborted if any of the scripts exits with an error. ## Licensing