Nginx official image modified to be more suitable to production environments
955
This container use the official Nginx docker image but is modified to be more suitable for production environement:
server_tokens is set to off (leads to not display Nginx version on error pages for instance)user1The built image is in the official Docker registry:
$ docker pull lvo9/nginx
If you want to create a Dockerfile based on this image, maybe you will have to re-switch to the root user to execute commands which need privilegied access. Don't forget to swith again to user1 and keep in mind each command executed after switching to user1 needs to be preceded by sudo and to be referenced in /etc/sudoers if it needs privilegied permissions. For instance:
FROM lvo9/nginx
USER root
RUN my-command-that-needs-root-permissions
# ...
RUN echo "user1 ALL = (root) NOPASSWD: /run.sh" >>/etc/sudoers
USER user1
CMD ["sudo", "/run.sh"]
For the rest, it works like the original Nginx image. You can refer to the official documentation for more information.
Note that the Docker repository owns the same version tag as the official image on which it is based (from 1.15.9 version).
Content type
Image
Digest
Size
55.3 MB
Last updated
over 7 years ago
docker pull lvo9/nginx