Example run commands in Dockerhub readme don't work
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker
- 领域
- devops, documentation
调研方向
从包含两个 docker run 示例的 Docker Hub README 部分开始,检查报告的 HAProxy 文件描述符错误。更新文档以讨论 --privileged 和 --ulimit,包括它们的权衡和替代方案,或者以其他方式使命令按描述正常工作。完成标准是:示例不再在没有解释的情况下失败,并且推荐 flag 的后果清晰明确。
由索引模型根据 Issue 内容生成。
描述
Summary: The example run commands in the Dockerhub readme don't work, but they can be fixed by adding or discussing the --privileged or --ulimit flags.
The Dockerhub readme suggests the following docker run commands:
docker run -d --name my-running-haproxy --sysctl net.ipv4.ip_unprivileged_port_start=0 my-haproxy
# Or:
docker run -d --name my-running-haproxy \
-v /path/to/etc/haproxy:/usr/local/etc/haproxy:ro --sysctl net.ipv4.ip_unprivileged_port_start=0 haproxy:2.3
When running either of these commands, HAProxy crashes with the following error message:
[ALERT] 040/170647 (8) : [haproxy.main()] Cannot raise FD limit to 8030, limit is 1024.
Running Docker in privileged mode lifts the 1024 limit on file descriptors. So that's one possible way to get past this error:
docker run -d --name my-running-haproxy --sysctl net.ipv4.ip_unprivileged_port_start=0 --privileged my-haproxy
# Or:
docker run -d --name my-running-haproxy \
-v /path/to/etc/haproxy:/usr/local/etc/haproxy:ro --sysctl net.ipv4.ip_unprivileged_port_start=0 --privileged haproxy:2.3
Perhaps the readme should be updated to either:
- discuss the
--privilegedand--ulimitflags, their pros, their cons, and alternatives; or - simply add
--privilegedto the exampledocker runcommands.
Option 1 is probably better so as not to encourage use of --privileged without knowledge of the consequences.
I tested this against haproxy:latest and haproxy:alpine, which as of today map to HAProxy 2.3.5.
- 主要语言
- Shell
- 星标
- 383
- 派生
- 162
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker-library/haproxy 的其他 Issue
-
难度 5/5 一周以上 新手友好度 15/100
docker-library/haproxy#243 · 3 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
docker-library/haproxy#237 · 5 条评论 · 2 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 48/100
docker-library/haproxy#217 · 4 条评论 ·
查看 docker-library/haproxy 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
module: core
难度 2/5 1-3 小时 新手友好度 75/100
bigbluebutton/bigbluebutton#25849 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
area:sandbox documentation enhancement platform:linux
难度 1/5 1 小时以内 新手友好度 85/100
anthropics/claude-code#96664 ·
-
cost:cheap severity:medium
难度 2/5 1-3 小时 新手友好度 70/100
fairagro/m4.2_sql_to_arc#227 ·