本镜像复制自 nginxinc/nginx-unprivileged 镜像,专门用于 Sumo Logic Kubernetes Collection 组件,作为其数据采集流程中的辅助服务。镜像保持了原非特权 NGINX 的核心特性,通过非 root 用户运行 NGINX 进程,以满足 Kubernetes 环境下的安全合规要求,同时为 Sumo Logic 采集器提供轻量级的 HTTP 服务能力(如反向代理、静态资源托管、请求转发等)。
本镜像主要适用于 Kubernetes 集群环境中,作为 Sumo Logic Kubernetes Collection 的辅助组件,典型使用场景包括:
通过 docker run 命令可直接启动镜像,基本示例如下:
bashdocker run -d \ --name sumologic-nginx-unprivileged \ -p 8080:8080 \ # 非特权镜像默认使用 8080 端口(替代 root 镜像的 80 端口) -v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro \ # 挂载自定义 NGINX 配置文件 sumologic/nginx-unprivileged # 假设镜像名称为 sumologic/nginx-unprivileged(具体以实际为准)
在 Kubernetes 环境中,通常作为 Sumo Logic 采集器 Pod 的 sidecar 容器运行,示例 Deployment 片段如下:
yamlapiVersion: apps/v1 kind: Deployment metadata: name: sumologic-collector namespace: sumologic spec: template: spec: containers: - name: nginx-unprivileged image: sumologic/nginx-unprivileged # 本镜像 ports: - containerPort: 8080 # 非特权端口 volumeMounts: - name: nginx-config mountPath: /etc/nginx/nginx.conf subPath: nginx.conf - name: nginx-logs mountPath: /var/log/nginx # 日志挂载至持久化存储或日志采集路径 securityContext: runAsUser: 101 # 匹配镜像默认非特权用户 UID runAsGroup: 101 allowPrivilegeEscalation: false volumes: - name: nginx-config configMap: name: sumologic-nginx-config # 包含 NGINX 配置的 ConfigMap - name: nginx-logs emptyDir: {} # 或使用持久卷
本镜像支持通过环境变量调整 NGINX 运行参数(基于 nginxinc/nginx-unprivileged 特性):
| 环境变量 | 描述 | 默认值 |
|---|---|---|
NGINX_HTTP_PORT | HTTP 服务监听端口(非特权端口,>1024) | 8080 |
NGINX_HTTPS_PORT | HTTPS 服务监听端口(非特权端口) | 8443 |
NGINX_USER | 运行 NGINX 的用户 UID | 101 |
NGINX_GROUP | 运行 NGINX 的用户组 GID | 101 |
NGINX_LOG_DIR | 日志文件存储路径 | /var/log/nginx |
NGINX 配置可通过挂载自定义 nginx.conf 或配置片段实现。例如,为 Sumo Logic 采集器配置反向代理规则:
nginx# 自定义 nginx.conf 示例(用于转发采集器 API 请求) worker_processes auto; events { worker_connections 1024; } http { server { listen 8080; # 匹配环境变量 NGINX_HTTP_PORT server_name sumologic-collector-proxy; location /metrics { proxy_pass http://sumologic-collector:9090; # 转发至采集器 metrics 端点 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } }
挂载该配置文件至容器:
bashdocker run -d \ -v $(pwd)/custom-nginx.conf:/etc/nginx/nginx.conf:ro \ sumologic/nginx-unprivileged
101(默认),挂载宿主机目录时需确保该用户有读/写权限。您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务