Skip to content

Commit 8e265b3

Browse files
Jim GalasynJoao Fernandes
authored andcommitted
Update UCP command line examples to use full form (docker#180)
1 parent 8fb6672 commit 8e265b3

27 files changed

Lines changed: 60 additions & 55 deletions

datacenter/ucp/2.2/guides/admin/backups-and-disaster-recovery.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ verify its contents:
5050

5151
```none
5252
# Create a backup, encrypt it, and store it on /tmp/backup.tar
53-
$ docker run --rm -i --name ucp \
53+
$ docker container run --rm -i --name ucp \
5454
-v /var/run/docker.sock:/var/run/docker.sock \
5555
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} backup --interactive > /tmp/backup.tar
5656
@@ -65,7 +65,7 @@ following example:
6565

6666
```none
6767
# Create a backup, encrypt it, and store it on /tmp/backup.tar
68-
$ docker run --rm -i --name ucp \
68+
$ docker container run --rm -i --name ucp \
6969
-v /var/run/docker.sock:/var/run/docker.sock \
7070
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} backup --interactive \
7171
--passphrase "secret" > /tmp/backup.tar
@@ -100,7 +100,7 @@ The example below shows how to restore a UCP cluster from an existing backup
100100
file, presumed to be located at `/tmp/backup.tar`:
101101

102102
```none
103-
$ docker run --rm -i --name ucp \
103+
$ docker container run --rm -i --name ucp \
104104
-v /var/run/docker.sock:/var/run/docker.sock \
105105
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} restore < /tmp/backup.tar
106106
```
@@ -109,7 +109,7 @@ If the backup file is encrypted with a passphrase, you will need to provide the
109109
passphrase to the restore operation:
110110

111111
```none
112-
$ docker run --rm -i --name ucp \
112+
$ docker container run --rm -i --name ucp \
113113
-v /var/run/docker.sock:/var/run/docker.sock \
114114
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} restore --passphrase "secret" < /tmp/backup.tar
115115
```
@@ -119,7 +119,7 @@ backup file should be mounted to the container rather than streamed through
119119
stdin:
120120

121121
```none
122-
$ docker run --rm -i --name ucp \
122+
$ docker container run --rm -i --name ucp \
123123
-v /var/run/docker.sock:/var/run/docker.sock \
124124
-v /tmp/backup.tar:/config/backup.tar \
125125
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} restore -i

datacenter/ucp/2.2/guides/admin/configure/integrate-with-dtr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ DTR repository you created.
9797

9898
```none
9999
# Pull hello-world from Docker Store
100-
docker pull hello-world:latest
100+
docker image pull hello-world:latest
101101

102102
# Re-tag it
103103
docker tag hello-world:latest <dtr-domain>/<user>/hello-world:latest
@@ -106,7 +106,7 @@ DTR repository you created.
106106
docker login <dtr-domain>
107107

108108
# Push your image to DTR
109-
docker push <dtr-domain>/<user>/hello-world:latest
109+
docker image push <dtr-domain>/<user>/hello-world:latest
110110
```
111111

112112
3. Validate that your image is now stored in DTR.

datacenter/ucp/2.2/guides/admin/configure/join-windows-worker-nodes.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ On Windows Server 2016, in a PowerShell terminal running as Administrator,
6060
log in to Docker Hub with the `docker login` command and pull the listed images.
6161

6262
```ps
63-
PS> docker pull {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }}
64-
PS> docker pull {{ page.ucp_org }}/ucp-dsinfo-win:{{ page.ucp_version }}
63+
PS> docker image pull {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }}
64+
PS> docker image pull {{ page.ucp_org }}/ucp-dsinfo-win:{{ page.ucp_version }}
6565
```
6666

6767
### Run the Windows node setup script
@@ -70,9 +70,13 @@ You need to open ports 2376 and 12376, and create certificates
7070
for the Docker daemon to communicate securely. Run this command:
7171

7272
```ps
73-
PS> docker run --rm {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} windows-script | powershell -noprofile -noninteractive -command 'Invoke-Expression -Command $input'
73+
PS> docker container run --rm {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} windows-script | powershell -noprofile -noninteractive -command 'Invoke-Expression -Command $input'
7474
```
7575

76+
> Docker daemon restart
77+
>
78+
> When you run `windows-script`, the Docker service is unavailable temporarily.
79+
7680
The Windows node is ready to join the swarm. Run the setup script on each
7781
instance of Windows Server that will be a worker node.
7882

@@ -125,9 +129,10 @@ To see the script, you can run the `windows-script` command without piping
125129
to the `Invoke-Expression` cmdlet.
126130

127131
```ps
128-
PS> docker run --rm {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} windows-script
132+
PS> docker container run --rm {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} windows-script
129133
```
130134

135+
131136
### Open ports in the Windows firewall
132137

133138
UCP and Docker EE require that ports 2376 and 12376 are open for inbound
@@ -148,7 +153,7 @@ PS> netsh advfirewall firewall add rule name="docker_proxy" dir=in action=allow
148153
to generate certificates.
149154

150155
```ps
151-
PS> docker run --rm -v C:\ProgramData\docker\daemoncerts:C:\certs {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} generate-certs
156+
PS> docker container run --rm -v C:\ProgramData\docker\daemoncerts:C:\certs {{ page.ucp_org }}/ucp-agent-win:{{ page.ucp_version }} generate-certs
152157
```
153158
154159
3. To set up certificates, run the following commands to stop and unregister the

datacenter/ucp/2.2/guides/admin/configure/store-logs-in-an-external-system.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@ deployment which can be used for logging.
2323
```none
2424
docker volume create --name orca-elasticsearch-data
2525
26-
docker run -d \
26+
docker container run -d \
2727
--name elasticsearch \
2828
-v orca-elasticsearch-data:/usr/share/elasticsearch/data \
2929
elasticsearch elasticsearch -Des.network.host=0.0.0.0
3030
31-
docker run -d \
31+
docker container run -d \
3232
-p 514:514 \
3333
--name logstash \
3434
--link elasticsearch:es \
3535
logstash \
3636
sh -c "logstash -e 'input { syslog { } } output { stdout { } elasticsearch { hosts => [ \"es\" ] } } filter { json { source => \"message\" } }'"
3737
38-
docker run -d \
38+
docker container run -d \
3939
--name kibana \
4040
--link elasticsearch:elasticsearch \
4141
-p 5601:5601 \

datacenter/ucp/2.2/guides/admin/configure/use-trusted-images-for-ci.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ While still logged in as an admin, navigate to "Admin Settings" and select the "
2626
subsection. Select the checkbox to enable content trust and in the select box that appears,
2727
select the "CI" team we have just created. Save the settings.
2828

29-
This policy will require that every image that referenced in a `docker pull`, `docker run`,
30-
or `docker service create` must be signed by a key corresponding to a member of the "CI" team.
31-
In this case, the only member is the "jenkins" user.
29+
This policy will require that every image that referenced in a `docker image pull`,
30+
`docker container run`, or `docker service create` must be signed by a key corresponding
31+
to a member of the "CI" team. In this case, the only member is the "jenkins" user.
3232

3333
## Create keys for the Jenkins user
3434

@@ -63,7 +63,7 @@ configuration directory. Typically this is found at `~/.docker/trust`.
6363

6464
There are two ways to enable content trust: globally, and per operation. To enabled content
6565
trust globally, set the environment variable `DOCKER_CONTENT_TRUST=1`. To enable on a per
66-
operation basis, wherever you run `docker push` in your Jenkins scripts, add the flag
66+
operation basis, wherever you run `docker image push` in your Jenkins scripts, add the flag
6767
`--disable-content-trust=false`. You may wish to use this second option if you only want
6868
to sign some images.
6969

@@ -92,12 +92,12 @@ notary -s https://my_notary_server.com -d ~/.docker/trust publish my_repository
9292
N.B. the `-s` flag provides the server hosting a notary service. If you are operating against
9393
Docker Hub, this will be `https://notary.docker.io`. If you are operating against your own DTR
9494
instance, this will be the same hostname you use in image names when running docker commands preceded
95-
by the `https://` scheme. For example, if you would run `docker push my_dtr:4443/me/an_image` the value
95+
by the `https://` scheme. For example, if you would run `docker image push my_dtr:4443/me/an_image` the value
9696
of the `-s` flag would be expected to be `https://my_dtr:4443`.
9797

9898
N.B. if you are using DTR, the name of the repository should be identical to the full name you use
99-
in a `docker push` command. If however you use Docker Hub, the name you use in a `docker push`
100-
must be preceded by `docker.io/`. i.e. if you ran `docker push me/alpine`, you would
99+
in a `docker image push` command. If however you use Docker Hub, the name you use in a `docker image push`
100+
must be preceded by `docker.io/`. i.e. if you ran `docker image push me/alpine`, you would
101101
`notary init docker.io/me/alpine`.
102102

103103
For brevity, we will exclude the `-s` and `-d` flags from subsequent command, but be aware you
@@ -144,6 +144,6 @@ now use the key we imported to sign any images we push to this repository.
144144

145145
Through either the Docker CLI, or the UCP browser interface, we will find that any images
146146
that do not meet our signing policy cannot be used. The signing policy we set up requires
147-
that the "CI" team must have signed any image we attempt to `docker pull`, `docker run`,
147+
that the "CI" team must have signed any image we attempt to `docker image pull`, `docker container run`,
148148
or `docker service create`, and the only member of that team is the "jenkins" user. This
149149
restricts us to only running images that were published by our Jenkins CI system.

datacenter/ucp/2.2/guides/admin/install/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ To install UCP:
6464

6565
```none
6666
# Pull the latest version of UCP
67-
$ docker pull {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }}
67+
$ docker image pull {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }}
6868
6969
# Install UCP
70-
$ docker run --rm -it --name ucp \
70+
$ docker container run --rm -it --name ucp \
7171
-v /var/run/docker.sock:/var/run/docker.sock \
7272
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} install \
7373
--host-address <node-ip-address> \

datacenter/ucp/2.2/guides/admin/install/uninstall.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To uninstall UCP, log in to a manager node using ssh, and run the following
2626
command:
2727

2828
```bash
29-
$ docker run --rm -it \
29+
$ docker container run --rm -it \
3030
-v /var/run/docker.sock:/var/run/docker.sock \
3131
--name ucp \
3232
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} uninstall-ucp --interactive

datacenter/ucp/2.2/guides/admin/install/upgrade.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ To upgrade from the CLI, log into a UCP manager node using ssh, and run:
8080

8181
```
8282
# Get the latest version of UCP
83-
$ docker pull {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }}
83+
$ docker image pull {{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }}
8484
85-
$ docker run --rm -it \
85+
$ docker container run --rm -it \
8686
--name ucp \
8787
-v /var/run/docker.sock:/var/run/docker.sock \
8888
{{ page.ucp_org }}/{{ page.ucp_repo }}:{{ page.ucp_version }} \

datacenter/ucp/2.2/guides/admin/manage-users/manage-access-with-collections.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ networks, containers, and services, the system identifies a set of
116116
of the resource, like `/Shared/Private/hans`, and it tries to find the parent
117117
that's closest to the root that the user has the `Node Schedule` permission on.
118118

119-
For example, when a user with a default configuration runs `docker run nginx`,
119+
For example, when a user with a default configuration runs `docker container run nginx`,
120120
the system interprets this to mean, "Create an `nginx` container under the
121121
user's default collection, which is at `/Shared/Private/hans`, and deploy it
122122
on one of the nodes under `/Shared`.

datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-configurations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ NODE_ADDRESS=$(docker info --format '{{.Swarm.NodeAddr}}')
9999
VERSION=$(docker image ls --format '{{.Tag}}' docker/ucp-auth | head -n 1)
100100
# This command will output detailed status of all servers and database tables
101101
# in the RethinkDB cluster.
102-
docker run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 db-status
102+
docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 db-status
103103

104104
Server Status: [
105105
{
@@ -132,7 +132,7 @@ NUM_MANAGERS=$(docker node ls --filter role=manager -q | wc -l)
132132
VERSION=$(docker image ls --format '{{.Tag}}' docker/ucp-auth | head -n 1)
133133
# This reconfigure-db command will repair the RethinkDB cluster to have a
134134
# number of replicas equal to the number of manager nodes in the cluster.
135-
docker run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} --emergency-repair
135+
docker container run --rm -v ucp-auth-store-certs:/tls docker/ucp-auth:${VERSION} --db-addr=${NODE_ADDRESS}:12383 --debug reconfigure-db --num-replicas ${NUM_MANAGERS} --emergency-repair
136136

137137
time="2017-07-14T20:46:09Z" level=debug msg="Connecting to db ..."
138138
time="2017-07-14T20:46:09Z" level=debug msg="connecting to DB Addrs: [192.168.1.25:12383]"

0 commit comments

Comments
 (0)