nginx-unprivileged

Nginx Unprivileged Docker Image

非特权NGINX Docker构建文件是指用于构建以非root用户身份在Docker容器中运行NGINX的配置文件,通过预设用户权限、环境变量及安全参数,确保NGINX在低权限模式下仍能正常处理HTTP请求、反向代理及负载均衡等功能,有效降低因容器漏洞引发的权限提升风险,适用于对安全性要求较高的生产环境部署场景。

193 次收藏下载次数: 0状态:社区镜像维护者:nginxinc仓库类型:镜像最近更新:
下载命令
点击查看

This repo contains a series of Dockerfiles to create an NGINX Docker image that runs NGINX as a non root, unprivileged user. Notable differences with respect to the official NGINX Docker image include:

  • The default NGINX listen port is now 8080 instead of 80 (this is no longer necessary as of Docker 20.03 but it's still required in other container runtimes).
  • The default NGINX user directive in /etc/nginx/nginx.conf has been removed.
  • The default NGINX PID has been moved from /var/run/nginx.pid to /tmp/nginx.pid.
  • Change *_temp_path variables to /tmp/*.

New images are built and pushed to on a weekly basis (every Monday night).

Check out the https://hub.docker.com/_/nginx for the upstream Docker NGINX image for a detailed explanation on how to use this image.

Note: Issues related to security vulnerabilities will be promptly closed unless they are accompanied by a solid reasoning as to why the vulnerability poses a real security threat to this image. Check out the https://github.com/nginxinc/docker-nginx-unprivileged/blob/main/.github/SECURITY.md doc for more details.

Supported Image Registries and Platforms

Image Registries

You can find built images in the following registries:

  • GitHub Container Registry - https://github.com/nginxinc/docker-nginx-unprivileged/pkgs/container/nginx-unprivileged
  • Docker Hub - https://hub.docker.com/r/nginxinc/nginx-unprivileged

Platforms

Most images are built for the amd64, arm32v5 (for Debian), arm32v6 (for Alpine), arm32v7, arm64v8, i386, mips64le (for Debian), ppc64le and s390x architectures. Alpine slim images are only built for amd64 and arm64v8.

Common Issues

  • If you overrive the default nginx.conf file you may receive the message nginx: [emerg] open() "/var/run/nginx.pid" failed (13: Permission denied), in this case you have to add the line pid /tmp/nginx.pid into your config.

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 nginx-unprivileged 镜像标签

docker pull docker.xuanyuan.run/nginxinc/nginx-unprivileged:<标签>

DockerHub 原生拉取命令

docker pull nginxinc/nginx-unprivileged:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告