Problem description
A number of locations throughout the docs give examples using the long syntax for --publish. A typical example is docker-for-aws/load-balancer.md:
docker service create --name nginx --publish target=80,port=80 nginx
However, port= is invalid syntax. Running the above command on a new Docker CE 17.09.0 cluster reports:
invalid argument "target=80,port=80" for --publish: invalid field key port
See 'docker service create --help'.
Rather than target and port, the relevant parameters are published and target. I base this on the port handling code: https://github.com/docker/cli/blob/d7f6563efc059dcc59b21f30f68e9e8282481af9/opts/port.go#L14
Corrected, the above example would be:
docker service create --name nginx --publish published=80,target=80 nginx
Problem location
docker-for-aws/deploy.md
docker-for-aws/load-balancer.md
docker-for-azure/deploy.md
engine/admin/prometheus.md
engine/swarm/configs.md
engine/swarm/ingress.md
engine/swarm/secrets.md
engine/swarm/services.md
engine/swarm/stack-deploy.md
registry/deploying.md
Project version(s) affected
All.
Suggestions for a fix
It appears the issue was introduced in #5323. The examples need to be updated on all referenced pages. Some care will be needed to update engine/swarm/ingress.md as the documentation is more detailed and refers to a mix of parameters: <PUBLISHED-PORT>, <CONTAINER-PORT>, and <TARGET-PORT>.
The related issue docker/cli#695 will also need a fix.
Problem description
A number of locations throughout the docs give examples using the long syntax for
--publish. A typical example is docker-for-aws/load-balancer.md:docker service create --name nginx --publish target=80,port=80 nginxHowever,
port=is invalid syntax. Running the above command on a new Docker CE 17.09.0 cluster reports:Rather than
targetandport, the relevant parameters arepublishedandtarget. I base this on the port handling code: https://github.com/docker/cli/blob/d7f6563efc059dcc59b21f30f68e9e8282481af9/opts/port.go#L14Corrected, the above example would be:
docker service create --name nginx --publish published=80,target=80 nginxProblem location
docker-for-aws/deploy.md
docker-for-aws/load-balancer.md
docker-for-azure/deploy.md
engine/admin/prometheus.md
engine/swarm/configs.md
engine/swarm/ingress.md
engine/swarm/secrets.md
engine/swarm/services.md
engine/swarm/stack-deploy.md
registry/deploying.md
Project version(s) affected
All.
Suggestions for a fix
It appears the issue was introduced in #5323. The examples need to be updated on all referenced pages. Some care will be needed to update engine/swarm/ingress.md as the documentation is more detailed and refers to a mix of parameters:
<PUBLISHED-PORT>,<CONTAINER-PORT>, and<TARGET-PORT>.The related issue docker/cli#695 will also need a fix.