docs
docs copied to clipboard
Fix `docker service create` command example
Is this a docs issue?
- [X] My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
Command
docker service create --replicas 1 --name my-prometheus \
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
--publish published=9090,target=9090,protocol=tcp \
--add-host host.docker.internal:host-gateway \
prom/prometheus
gives the error
unknown flag: --add-host
Location
https://docs.docker.com/config/daemon/prometheus/
Suggestion
No response
Thanks for reporting; looks like that should be --host (without add);
docker service create --help | grep host
--host list Set one or more custom host-to-IP mappings (host:ip)
--hostname string Container hostname
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
/lifecycle stale
/remove-lifecycle stale
There hasn't been any activity on this issue for a long time.
If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment.
If not, this issue will be closed in 14 days. This helps our maintainers focus on the active issues.
Prevent issues from auto-closing with a /lifecycle frozen comment.
/lifecycle stale
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked