docker-nginx icon indicating copy to clipboard operation
docker-nginx copied to clipboard

Question/documentation of stability guarantees of NGINX_VERSION environment variable

Open rlee287 opened this issue 1 year ago • 2 comments

The Dockerfiles used to build the Nginx images use the environment variable NGINX_VERSION to internally specify the NGINX version to download or build. Is this an implementation detail, subject to change arbitrarily without notice, or can this be considered part of the stable interface the container provides (that can be reliably used to e.g. query the NGINX version in an a custom /docker-entrypoint.d script)? If this is part of the stable interface, I believe this should be documented somewhere.

rlee287 avatar Sep 09 '24 05:09 rlee287

you can rely on NGINX_VERSION to be present in the image. Dockerfiles are created per nginx version so it's easy and helpful to have this variable. We'll work on documenting env variables

oxpa avatar Sep 09 '24 10:09 oxpa

I think it can be considered a stable interface, yes. We rely on it in multiple parts of official Dockerfiles, and in modules/ too.

thresheek avatar Sep 09 '24 19:09 thresheek