docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix `docker service create` command example

Open simon-liebehenschel opened this issue 2 years ago • 4 comments

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

simon-liebehenschel avatar Sep 19 '23 09:09 simon-liebehenschel

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

thaJeztah avatar Sep 19 '23 09:09 thaJeztah

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

docker-robot[bot] avatar Dec 18 '23 01:12 docker-robot[bot]

/remove-lifecycle stale

simon-liebehenschel avatar Dec 18 '23 09:12 simon-liebehenschel

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

docker-robot[bot] avatar Mar 17 '24 01:03 docker-robot[bot]

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

docker-robot[bot] avatar Apr 30 '24 03:04 docker-robot[bot]