Example run commands in Dockerhub readme don't work
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- docker
- Domain
- devops, documentation
Research direction
Start with the Docker Hub README sections containing the two docker run examples and review the reported HAProxy file-descriptor error. Update the documentation to discuss --privileged and --ulimit, including their trade-offs and alternatives, or otherwise make the commands work as described. Done means the examples no longer fail without explanation and the consequences of the recommended flags are clear.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Shell
- Stars
- 383
- Forks
- 162
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker-library/haproxy
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
docker-library/haproxy#243 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
docker-library/haproxy#237 · 5 comments · 2 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
docker-library/haproxy#217 · 4 comments ·
All issues in docker-library/haproxy
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#156 ·
-
Priority/High ready-for-agent Severity/Major Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
comp/cli P3 type/docs
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#119756 · 1 comment ·
-
comp: build/pipeline type: bug version: current (v17+)
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
angular/angularfire#3766 ·
-
out-of-date
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
CachyOS/CachyOS-PKGBUILDS#1903 ·