diff --git a/_data/engine-cli-edge/docker_service_create.yaml b/_data/engine-cli-edge/docker_service_create.yaml
index 1a07484b38..eb04436a31 100644
--- a/_data/engine-cli-edge/docker_service_create.yaml
+++ b/_data/engine-cli-edge/docker_service_create.yaml
@@ -1041,7 +1041,7 @@ examples: |-
for the same service as above:
```bash
- $ docker service create --name my_web --replicas 3 --publish target=8080,port=80 nginx
+ $ docker service create --name my_web --replicas 3 --publish published=8080,target=80 nginx
```
The options you can specify are:
@@ -1063,7 +1063,7 @@ examples: |-
| protocol |
--publish 8080:80/tcp |
- --publish target=8080,port=80,protocol=tcp |
+ --publish published=8080,target=80,protocol=tcp |
The protocol to use, either `tcp` or `udp`. Defaults to `tcp`. To bind a
port for both protocols, specify the `-p` or `--publish` flag twice.
diff --git a/_data/engine-cli/docker_service_create.yaml b/_data/engine-cli/docker_service_create.yaml
index 0843fc710b..791c4f767f 100644
--- a/_data/engine-cli/docker_service_create.yaml
+++ b/_data/engine-cli/docker_service_create.yaml
@@ -1029,7 +1029,7 @@ examples: |-
using the `--publish` flag:
```bash
- $ docker service create --publish : nginx
+ $ docker service create --publish : nginx
```
For example:
diff --git a/docker-for-aws/deploy.md b/docker-for-aws/deploy.md
index 7230c1fd37..b01949ee0a 100644
--- a/docker-for-aws/deploy.md
+++ b/docker-for-aws/deploy.md
@@ -148,7 +148,7 @@ You can now start creating containers and services.
You can run websites too. Ports exposed with `--publish` are automatically exposed
through the platform load balancer:
- $ docker service create --name nginx --publish target=80,port=80 nginx
+ $ docker service create --name nginx --publish published=80,target=80 nginx
Once up, find the `DefaultDNSTarget` output in either the AWS or Azure portals
to access the site.
@@ -184,7 +184,7 @@ A good sample app to test deployment of stacks is the [Docker voting app](https:
By default, apps deployed with stacks do not have ports publicly exposed. Update port mappings for services, and Docker will automatically wire up the underlying platform load balancers:
- docker service update --publish-add target=80,port=80
+ docker service update --publish-add published=80,target=80
### Images in private repos
diff --git a/docker-for-aws/load-balancer.md b/docker-for-aws/load-balancer.md
index 434f1afef6..fc31647a3f 100644
--- a/docker-for-aws/load-balancer.md
+++ b/docker-for-aws/load-balancer.md
@@ -11,7 +11,7 @@ title: Configure the Docker for AWS load balancer
When you create a service, any ports that are exposed with `-p` are automatically exposed through the platform load balancer:
```bash
-$ docker service create --name nginx --publish target=80,port=80 nginx
+$ docker service create --name nginx --publish published=80,target=80 nginx
```
This opens up port 80 on the Elastic Load Balancer (ELB) and direct any traffic
@@ -36,8 +36,8 @@ described in the service label `com.docker.aws.lb.arn`
$ docker service create \
--name demo \
--detach=true \
- --publish target=80,port=80 \
- --publish target=443,port=80 \
+ --publish published=80,target=80 \
+ --publish published=443,target=80 \
--label com.docker.aws.lb.arn="arn:aws:acm:us-east-1:0123456789:certificate/c02117b6-2b5f-4507-8115-87726f4ab963" \
yourname/your-image:latest
```
@@ -70,8 +70,8 @@ Listen for HTTP on ports 80 and HTTPS on 444
$ docker service create \
--name demo \
--detach=true \
- --publish target=80,port=80 \
- --publish target=444,port=80 \
+ --publish published=80,target=80 \
+ --publish published=444,target=80 \
--label com.docker.aws.lb.arn="arn:aws:acm:us-east-1:0123456789:certificate/c02117b6-2b5f-4507-8115-87726f4ab963@444" \
yourname/your-image:latest
```
@@ -82,8 +82,8 @@ $ docker service create \
$ docker service create \
--name demo \
--detach=true \
- --publish target=80,port=80 \
- --publish target=444,port=80 \
+ --publish published=80,target=80 \
+ --publish published=444,target=80 \
--label com.docker.aws.lb.arn="arn:aws:acm:us-east-1:0123456789:certificate/c02117b6-2b5f-4507-8115-87726f4ab963@443,444" \
yourname/your-image:latest
```
@@ -94,7 +94,7 @@ $ docker service create \
$ docker service create \
--name demo \
--detach=true \
- --publish target=8080,port=80 \
+ --publish published=8080,target=80 \
--label com.docker.aws.lb.arn="arn:aws:acm:us-east-1:0123456789:certificate/c02117b6-2b5f-4507-8115-87726f4ab963@8080" \
yourname/your-image:latest
```
diff --git a/docker-for-azure/deploy.md b/docker-for-azure/deploy.md
index 22752f5ee8..81164429bd 100644
--- a/docker-for-azure/deploy.md
+++ b/docker-for-azure/deploy.md
@@ -131,7 +131,7 @@ You can now start creating containers and services.
You can run websites too. Ports exposed with `--publish` are automatically exposed through the platform load balancer:
- $ docker service create --name nginx --publish target=80,port=80 nginx
+ $ docker service create --name nginx --publish published=80,target=80 nginx
Once up, find the `DefaultDNSTarget` output in either the AWS or Azure portals to access the site.
@@ -161,7 +161,7 @@ A good sample app to test deployment of stacks is the [Docker voting app](https:
By default, apps deployed with stacks do not have ports publicly exposed. Update port mappings for services, and Docker will automatically wire up the underlying platform load balancers:
- docker service update --publish-add target=80,port=80
+ docker service update --publish-add published=80,target=80
### Images in private repos
diff --git a/engine/admin/prometheus.md b/engine/admin/prometheus.md
index 97855f87aa..db1dedacc5 100644
--- a/engine/admin/prometheus.md
+++ b/engine/admin/prometheus.md
@@ -200,7 +200,7 @@ Next, start a single-replica Prometheus service using this configuration.
```bash
$ docker service create --replicas 1 --name my-prometheus \
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
- --publish target=9090,port=9090,protocol=tcp \
+ --publish published=9090,target=9090,protocol=tcp \
prom/prometheus
```
@@ -210,7 +210,7 @@ $ docker service create --replicas 1 --name my-prometheus \
```bash
$ docker service create --replicas 1 --name my-prometheus \
--mount type=bind,source=/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml \
- --publish target=9090,port=9090,protocol=tcp \
+ --publish published=9090,target=9090,protocol=tcp \
prom/prometheus
```
@@ -220,7 +220,7 @@ $ docker service create --replicas 1 --name my-prometheus \
```powershell
PS C:\> docker service create --replicas 1 --name my-prometheus
--mount type=bind,source=C:/tmp/prometheus.yml,destination=/etc/prometheus/prometheus.yml
- --publish target=9090,port=9090,protocol=tcp
+ --publish published=9090,target=9090,protocol=tcp
prom/prometheus
```
diff --git a/engine/swarm/configs.md b/engine/swarm/configs.md
index 2455f9ad68..d246b282fe 100644
--- a/engine/swarm/configs.md
+++ b/engine/swarm/configs.md
@@ -227,7 +227,7 @@ This example assumes that you have PowerShell installed.
```powershell
PS> docker service create
--name my-iis
- --publish target=8000,port=8000
+ --publish published=8000,target=8000
--config src=homepage,target="\inetpub\wwwroot\index.html"
microsoft/iis:nanoserver
```
@@ -399,7 +399,7 @@ generate the site key and certificate, name the files `site.key` and
--secret site.key \
--secret site.crt \
--config source=site.conf,target=/etc/nginx/conf.d/site.conf \
- --publish target=3000,port=443 \
+ --publish published=3000,target=443 \
nginx:latest \
sh -c "exec nginx -g 'daemon off;'"
```
diff --git a/engine/swarm/ingress.md b/engine/swarm/ingress.md
index 67117fd662..028d2b120c 100644
--- a/engine/swarm/ingress.md
+++ b/engine/swarm/ingress.md
@@ -25,28 +25,28 @@ service.
## Publish a port for a service
-Use the `--publish` flag to publish a port when you create a service. The `port`
-is the port inside the container, and the `target` is the port to bind on the
-routing mesh. If you leave off the `target` port, a random high-numbered port is
+Use the `--publish` flag to publish a port when you create a service. `target`
+is the port inside the container, and `publish` is the port to bind on the
+routing mesh. If you leave off the `publish` port, a random high-numbered port is
bound for each service task. You will need to inspect the task to determine the
port.
```bash
$ docker service create \
--name \
- --publish target=,port= \
+ --publish published=,target= \
```
> **Note**: The older form of this syntax is a colon-separated string, where
-> the published port is first and the container port is second, such as
+> the published port is first and the target port is second, such as
> `-p 8080:80`. The new syntax is preferred because it is easier to read and
> allows more flexibility.
-The `` is the port where the container listens. If you omit it,
-a random high-numbered port is bound.
The `` is the port where the swarm makes the service available.
-This parameter is required.
+If you omit it, a random high-numbered port is bound.
+The `` is the port where the container listens. This parameter
+is required.
For example, the following command publishes port 80 in the nginx container to
port 8080 for any node in the swarm:
@@ -54,7 +54,7 @@ port 8080 for any node in the swarm:
```bash
$ docker service create \
--name my-web \
- --publish target=8080,port=80 \
+ --publish published=8080,target=80 \
--replicas 2 \
nginx
```
@@ -75,7 +75,7 @@ You can publish a port for an existing service using the following command:
```bash
$ docker service update \
- --publish-add target=,port= \
+ --publish-add published=,target= \
```
@@ -107,7 +107,7 @@ the port is published as a TCP port. If you use the longer syntax (recommended
```bash
$ docker service create --name dns-cache \
- --publish target=53,port=53 \
+ --publish published=53,target=53 \
dns-cache
```
@@ -125,8 +125,8 @@ $ docker service create --name dns-cache \
```bash
$ docker service create --name dns-cache \
- --publish target=53,port=53 \
- --publish target=53,port=53,protocol=udp \
+ --publish published=53,target=53 \
+ --publish published=53,target=53,protocol=udp \
dns-cache
```
@@ -145,7 +145,7 @@ $ docker service create --name dns-cache \
```bash
$ docker service create --name dns-cache \
- --publish target=53,port=53,protocol=udp \
+ --publish published=53,target=53,protocol=udp \
dns-cache
```
@@ -182,7 +182,7 @@ routing mesh is used. The following command creates a global service using
```bash
$ docker service create --name dns-cache \
- --publish target=53,port=53,protocol=udp,mode=host \
+ --publish published=53,target=53,protocol=udp,mode=host \
--mode global \
dns-cache
```
diff --git a/engine/swarm/secrets.md b/engine/swarm/secrets.md
index 226d025154..2b89ad55ba 100644
--- a/engine/swarm/secrets.md
+++ b/engine/swarm/secrets.md
@@ -305,7 +305,7 @@ This example assumes that you have PowerShell installed.
```powershell
PS> docker service create
--name my-iis
- --publish target=8000,port=8000
+ --publish published=8000,target=8000
--secret src=homepage,target="\inetpub\wwwroot\index.html"
microsoft/iis:nanoserver
```
@@ -497,7 +497,7 @@ generate the site key and certificate, name the files `site.key` and
--secret site.key \
--secret site.crt \
--secret source=site.conf,target=/etc/nginx/conf.d/site.conf \
- --publish target=3000,port=443 \
+ --publish published=3000,target=443 \
nginx:latest \
sh -c "exec nginx -g 'daemon off;'"
```
@@ -510,7 +510,7 @@ generate the site key and certificate, name the files `site.key` and
--secret site.key \
--secret site.crt \
--secret site.conf \
- --publish target=3000,port=443 \
+ --publish published=3000,target=443 \
nginx:latest \
sh -c "ln -s /run/secrets/site.conf /etc/nginx/conf.d/site.conf && exec nginx -g 'daemon off;'"
```
@@ -787,7 +787,7 @@ line.
--name wordpress \
--replicas 1 \
--network mysql_private \
- --publish target=30000,port=80 \
+ --publish published=30000,target=80 \
--mount type=volume,source=wpdata,destination=/var/www/html \
--secret source=mysql_password,target=wp_db_password,mode=0400 \
-e WORDPRESS_DB_USER="wordpress" \
diff --git a/engine/swarm/services.md b/engine/swarm/services.md
index 2c6f4010bb..f82fd1cb3e 100644
--- a/engine/swarm/services.md
+++ b/engine/swarm/services.md
@@ -337,8 +337,8 @@ Keep reading for more information and use cases for each of these methods.
#### Publish a service's ports using the routing mesh
To publish a service's ports externally to the swarm, use the
-`--publish :` flag. The swarm makes the service
-accessible at the target port **on every swarm node**. If an external host
+`--publish :` flag. The swarm makes the service
+accessible at the published port **on every swarm node**. If an external host
connects to that port on any swarm node, the routing mesh routes it to a task.
The external host does not need to know the IP addresses or internally-used
ports of the service tasks to interact with the service. When a user or process
@@ -354,7 +354,7 @@ three tasks on a 10-node swarm:
```bash
$ docker service create --name my_web \
--replicas 3 \
- --publish target=8080,port=80 \
+ --publish published=8080,target=80 \
nginx
```
diff --git a/engine/swarm/stack-deploy.md b/engine/swarm/stack-deploy.md
index 8b99993bd6..437a98a562 100644
--- a/engine/swarm/stack-deploy.md
+++ b/engine/swarm/stack-deploy.md
@@ -40,7 +40,7 @@ a throwaway registry, which you can discard afterward.
1. Start the registry as a service on your swarm:
```bash
- $ docker service create --name registry --publish target=5000,port=5000 registry:2
+ $ docker service create --name registry --publish published=5000,target=5000 registry:2
```
2. Check its status with `docker service ls`:
diff --git a/registry/deploying.md b/registry/deploying.md
index ae7f187fb8..1c9048b140 100644
--- a/registry/deploying.md
+++ b/registry/deploying.md
@@ -325,7 +325,7 @@ $ docker service create \
-e REGISTRY_HTTP_ADDR=0.0.0.0:80 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/run/secrets/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/run/secrets/domain.key \
- --publish target=80,port=80 \
+ --publish published=80,target=80 \
--replicas 1 \
registry:2
```
|