Browse code

Update to double-dash everywhere

These were found using `git grep -nE '[^-a-zA-Z0-9<>]-[a-zA-Z0-9]{2}'` (fair warning: _many_ false positives there).

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)

Tianon Gravi authored on 2014/03/14 02:46:02
Showing 51 changed files
... ...
@@ -6,13 +6,13 @@
6 6
 # docker build -t docker .
7 7
 #
8 8
 # # Mount your source in an interactive container for quick testing:
9
-# docker run -v `pwd`:/go/src/github.com/dotcloud/docker -privileged -i -t docker bash
9
+# docker run -v `pwd`:/go/src/github.com/dotcloud/docker --privileged -i -t docker bash
10 10
 #
11 11
 # # Run the test suite:
12
-# docker run -privileged docker hack/make.sh test
12
+# docker run --privileged docker hack/make.sh test
13 13
 #
14 14
 # # Publish a release:
15
-# docker run -privileged \
15
+# docker run --privileged \
16 16
 #  -e AWS_S3_BUCKET=baz \
17 17
 #  -e AWS_ACCESS_KEY=foo \
18 18
 #  -e AWS_SECRET_KEY=bar \
... ...
@@ -1409,7 +1409,7 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
1409 1409
 	cmd := cli.Subcmd("commit", "[OPTIONS] CONTAINER [REPOSITORY[:TAG]]", "Create a new image from a container's changes")
1410 1410
 	flComment := cmd.String([]string{"m", "-message"}, "", "Commit message")
1411 1411
 	flAuthor := cmd.String([]string{"a", "#author", "-author"}, "", "Author (eg. \"John Hannibal Smith <hannibal@a-team.com>\"")
1412
-	flConfig := cmd.String([]string{"#run", "-run"}, "", "Config automatically applied when the image is run. "+`(ex: -run='{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')`)
1412
+	flConfig := cmd.String([]string{"#run", "-run"}, "", "Config automatically applied when the image is run. "+`(ex: --run='{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')`)
1413 1413
 	if err := cmd.Parse(args); err != nil {
1414 1414
 		return nil
1415 1415
 	}
... ...
@@ -79,7 +79,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from build' -s t -l tag -d '
79 79
 complete -c docker -f -n '__fish_docker_no_subcommand' -a commit -d "Create a new image from a container's changes"
80 80
 complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s a -l author -d 'Author (eg. "John Hannibal Smith <hannibal@a-team.com>"'
81 81
 complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -s m -l message -d 'Commit message'
82
-complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l run -d 'Config automatically applied when the image is run. (ex: -run=\'{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}\')'
82
+complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -l run -d 'Config automatically applied when the image is run. (ex: --run=\'{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}\')'
83 83
 complete -c docker -A -f -n '__fish_seen_subcommand_from commit' -a '(__fish_print_docker_containers all)' -d "Container"
84 84
 
85 85
 # cp
... ...
@@ -202,7 +202,7 @@ complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l expose -d 'Expo
202 202
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s h -l hostname -d 'Container host name'
203 203
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s i -l interactive -d 'Keep stdin open even if not attached'
204 204
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l link -d 'Add link to another container (name:alias)'
205
-complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l lxc-conf -d 'Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"'
205
+complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l lxc-conf -d 'Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"'
206 206
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s m -l memory -d 'Memory limit (format: <number><optional unit>, where unit = b, k, m or g)'
207 207
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -s n -l networking -d 'Enable networking for this container'
208 208
 complete -c docker -A -f -n '__fish_seen_subcommand_from run' -l name -d 'Assign a name to the container'
... ...
@@ -174,7 +174,7 @@ __docker_subcommand () {
174 174
         (ps)
175 175
             _arguments '-a[Show all containers. Only running containers are shown by default]' \
176 176
                 '-h[Show help]' \
177
-                '-before-id=-[Show only container created before Id, include non-running one]:containers:__docker_containers' \
177
+                '--before-id=-[Show only container created before Id, include non-running one]:containers:__docker_containers' \
178 178
             '-n=-[Show n last created containers, include non-running one]:n:(1 5 10 25 50)'
179 179
             ;;
180 180
         (tag)
... ...
@@ -9,13 +9,13 @@
9 9
 #   wget http://raw.github.com/dotcloud/docker/master/contrib/desktop-integration/data/Dockerfile
10 10
 #
11 11
 #   # Build data image
12
-#   docker build -t data -rm .
12
+#   docker build -t data .
13 13
 #
14 14
 #   # Create a data container. (eg: iceweasel-data)
15
-#   docker run -name iceweasel-data data true
15
+#   docker run --name iceweasel-data data true
16 16
 #
17 17
 #   # List data from it
18
-#   docker run -volumes-from iceweasel-data busybox ls -al /data
18
+#   docker run --volumes-from iceweasel-data busybox ls -al /data
19 19
 
20 20
 docker-version 0.6.5
21 21
 
... ...
@@ -10,16 +10,16 @@
10 10
 #   wget http://raw.github.com/dotcloud/docker/master/contrib/desktop-integration/iceweasel/Dockerfile
11 11
 #
12 12
 #   # Build iceweasel image
13
-#   docker build -t iceweasel -rm .
13
+#   docker build -t iceweasel .
14 14
 #
15 15
 #   # Run stateful data-on-host iceweasel. For ephemeral, remove -v /data/iceweasel:/data
16 16
 #   docker run -v /data/iceweasel:/data -v /tmp/.X11-unix:/tmp/.X11-unix \
17
-#     -v /dev/snd:/dev/snd -lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' \
17
+#     -v /dev/snd:/dev/snd --lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' \
18 18
 #     -e DISPLAY=unix$DISPLAY iceweasel
19 19
 #
20 20
 #   # To run stateful dockerized data containers
21
-#   docker run -volumes-from iceweasel-data -v /tmp/.X11-unix:/tmp/.X11-unix \
22
-#     -v /dev/snd:/dev/snd -lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' \
21
+#   docker run --volumes-from iceweasel-data -v /tmp/.X11-unix:/tmp/.X11-unix \
22
+#     -v /dev/snd:/dev/snd --lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' \
23 23
 #     -e DISPLAY=unix$DISPLAY iceweasel
24 24
 
25 25
 docker-version 0.6.5
... ...
@@ -4,7 +4,7 @@
4 4
 #DOCKER="/usr/local/bin/docker"
5 5
 
6 6
 # Use DOCKER_OPTS to modify the daemon startup options.
7
-#DOCKER_OPTS="-dns 8.8.8.8 -dns 8.8.4.4"
7
+#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
8 8
 
9 9
 # If you need Docker to use an HTTP proxy, it can also be specified here.
10 10
 #export http_proxy="http://127.0.0.1:3128/"
... ...
@@ -10,7 +10,7 @@
10 10
 # can configure the list of syscalls.  When run, this script produces output
11 11
 # which, when stored in a file, can be passed to docker as follows:
12 12
 #
13
-# docker run -lxc-conf="lxc.seccomp=$file" <rest of arguments>
13
+# docker run --lxc-conf="lxc.seccomp=$file" <rest of arguments>
14 14
 #
15 15
 # The included sample file shows how to cut about a quarter of all syscalls,
16 16
 # which affecting most applications.
... ...
@@ -1,9 +1,9 @@
1 1
 #
2 2
 # Build: docker build -t apt-cacher .
3
-# Run: docker run -d -p 3142:3142 -name apt-cacher-run apt-cacher
3
+# Run: docker run -d -p 3142:3142 --name apt-cacher-run apt-cacher
4 4
 #
5 5
 # and then you can run containers with:
6
-#	docker run -t -i -rm -e http_proxy http://dockerhost:3142/ debian bash
6
+#	docker run -t -i --rm -e http_proxy http://dockerhost:3142/ debian bash
7 7
 #
8 8
 FROM		ubuntu
9 9
 MAINTAINER	SvenDowideit@docker.com
... ...
@@ -23,13 +23,13 @@ To build the image using:
23 23
 
24 24
 .. code-block:: bash
25 25
 
26
-    $ sudo docker build -rm -t eg_apt_cacher_ng .
26
+    $ sudo docker build -t eg_apt_cacher_ng .
27 27
 
28 28
 Then run it, mapping the exposed port to one on the host
29 29
 
30 30
 .. code-block:: bash
31 31
 
32
-    $ sudo docker run -d -p 3142:3142 -name test_apt_cacher_ng eg_apt_cacher_ng
32
+    $ sudo docker run -d -p 3142:3142 --name test_apt_cacher_ng eg_apt_cacher_ng
33 33
 
34 34
 To see the logfiles that are 'tailed' in the default command, you can use: 
35 35
 
... ...
@@ -59,7 +59,7 @@ break other HTTP clients which obey ``http_proxy``, such as ``curl``, ``wget`` a
59 59
 
60 60
 .. code-block:: bash
61 61
 
62
-    $ sudo docker run -rm -t -i -e http_proxy=http://dockerhost:3142/ debian bash
62
+    $ sudo docker run --rm -t -i -e http_proxy=http://dockerhost:3142/ debian bash
63 63
 
64 64
 **Option 3** is the least portable, but there will be times when you might need to
65 65
 do it and you can do it from your ``Dockerfile`` too.
... ...
@@ -70,7 +70,7 @@ service:
70 70
 
71 71
 .. code-block:: bash
72 72
 
73
-    $ sudo docker run -rm -t -i --volumes-from test_apt_cacher_ng eg_apt_cacher_ng bash
73
+    $ sudo docker run --rm -t -i --volumes-from test_apt_cacher_ng eg_apt_cacher_ng bash
74 74
 
75 75
     $$ /usr/lib/apt-cacher-ng/distkill.pl
76 76
     Scanning /var/cache/apt-cacher-ng, please wait...
... ...
@@ -119,13 +119,13 @@ Check the logs make sure it is working correctly.
119 119
 
120 120
 .. code-block:: bash
121 121
 
122
-    sudo docker attach -sig-proxy=false $container_id
122
+    sudo docker attach --sig-proxy=false $container_id
123 123
 
124 124
 Attach to the container to see the results in real-time.
125 125
 
126 126
 - **"docker attach**" This will allow us to attach to a background
127 127
   process to see what is going on.
128
-- **"-sig-proxy=false"** Do not forward signals to the container; allows
128
+- **"--sig-proxy=false"** Do not forward signals to the container; allows
129 129
   us to exit the attachment using Control-C without stopping the container.
130 130
 - **$container_id** The Id of the container we want to attach too.
131 131
 
... ...
@@ -37,24 +37,24 @@ And run the PostgreSQL server container (in the foreground):
37 37
 
38 38
 .. code-block:: bash
39 39
 
40
-    $ sudo docker run -rm -P -name pg_test eg_postgresql
40
+    $ sudo docker run --rm -P -name pg_test eg_postgresql
41 41
 
42 42
 There are  2 ways to connect to the PostgreSQL server. We can use 
43 43
 :ref:`working_with_links_names`, or we can access it from our host (or the network).
44 44
 
45
-.. note:: The ``-rm`` removes the container and its image when the container 
45
+.. note:: The ``--rm`` removes the container and its image when the container 
46 46
           exists successfully.
47 47
 
48 48
 Using container linking
49 49
 ^^^^^^^^^^^^^^^^^^^^^^^
50 50
 
51 51
 Containers can be linked to another container's ports directly using 
52
-``-link remote_name:local_alias`` in the client's ``docker run``. This will
52
+``--link remote_name:local_alias`` in the client's ``docker run``. This will
53 53
 set a number of environment variables that can then be used to connect:
54 54
 
55 55
 .. code-block:: bash
56 56
 
57
-    $ sudo docker run -rm -t -i -link pg_test:pg eg_postgresql bash
57
+    $ sudo docker run --rm -t -i --link pg_test:pg eg_postgresql bash
58 58
 
59 59
     postgres@7ef98b1b7243:/$ psql -h $PG_PORT_5432_TCP_ADDR -p $PG_PORT_5432_TCP_PORT -d docker -U docker --password
60 60
 
... ...
@@ -104,7 +104,7 @@ configuration and data:
104 104
 
105 105
 .. code-block:: bash
106 106
 
107
-    docker run -rm --volumes-from pg_test -t -i busybox sh
107
+    docker run --rm --volumes-from pg_test -t -i busybox sh
108 108
 
109 109
     / # ls
110 110
     bin      etc      lib      linuxrc  mnt      proc     run      sys      usr
... ...
@@ -51,7 +51,7 @@ try things out, and then exit when you're done.
51 51
 
52 52
 .. code-block:: bash
53 53
 
54
-    $ sudo docker run -i -t -name pybuilder_run shykes/pybuilder bash
54
+    $ sudo docker run -i -t --name pybuilder_run shykes/pybuilder bash
55 55
 
56 56
     $$ URL=http://github.com/shykes/helloflask/archive/master.tar.gz
57 57
     $$ /usr/local/bin/buildapp $URL
... ...
@@ -49,7 +49,7 @@ use a container link to provide access to our Redis database.
49 49
 Create your web application container
50 50
 -------------------------------------
51 51
 
52
-Next we can create a container for our application. We're going to use the ``-link`` 
52
+Next we can create a container for our application. We're going to use the ``--link`` 
53 53
 flag to create a link to the ``redis`` container we've just created with an alias of 
54 54
 ``db``. This will create a secure tunnel to the ``redis`` container and expose the 
55 55
 Redis instance running inside that container to only this container.
... ...
@@ -19,14 +19,14 @@ Build the image using:
19 19
 
20 20
 .. code-block:: bash
21 21
 
22
-    $ sudo docker build -rm -t eg_sshd .
22
+    $ sudo docker build -t eg_sshd .
23 23
 
24 24
 Then run it. You can then use ``docker port`` to find out what host port the container's
25 25
 port 22 is mapped to:
26 26
 
27 27
 .. code-block:: bash
28 28
 
29
-    $ sudo docker run -d -P -name test_sshd eg_sshd
29
+    $ sudo docker run -d -P --name test_sshd eg_sshd
30 30
     $ sudo docker port test_sshd 22
31 31
     0.0.0.0:49154
32 32
 
... ...
@@ -309,9 +309,9 @@ daemon for the containers:
309 309
    sudo nano /etc/default/docker
310 310
    ---
311 311
    # Add:
312
-   DOCKER_OPTS="-dns 8.8.8.8"
312
+   DOCKER_OPTS="--dns 8.8.8.8"
313 313
    # 8.8.8.8 could be replaced with a local DNS server, such as 192.168.1.1
314
-   # multiple DNS servers can be specified: -dns 8.8.8.8 -dns 192.168.1.1
314
+   # multiple DNS servers can be specified: --dns 8.8.8.8 --dns 192.168.1.1
315 315
 
316 316
 The Docker daemon has to be restarted:
317 317
 
... ...
@@ -203,7 +203,7 @@ What's new
203 203
 
204 204
 .. http:get:: /images/viz
205 205
 
206
-   This URI no longer exists.  The ``images -viz`` output is now generated in
206
+   This URI no longer exists.  The ``images --viz`` output is now generated in
207 207
    the client, using the ``/images/json`` data.
208 208
 
209 209
 v1.6
... ...
@@ -1276,8 +1276,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1276 1276
 3.3 CORS Requests
1277 1277
 -----------------
1278 1278
 
1279
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1279
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1280 1280
 
1281 1281
 .. code-block:: bash
1282 1282
 
1283
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1283
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
... ...
@@ -1045,7 +1045,7 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1045 1045
 3.3 CORS Requests
1046 1046
 -----------------
1047 1047
 
1048
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1048
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1049 1049
     
1050
-    docker -d -H="tcp://192.168.1.9:4243" -api-enable-cors
1050
+    docker -d -H="tcp://192.168.1.9:4243" --api-enable-cors
1051 1051
 
... ...
@@ -1124,7 +1124,7 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1124 1124
 3.3 CORS Requests
1125 1125
 -----------------
1126 1126
 
1127
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1127
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1128 1128
     
1129
-    docker -d -H="192.168.1.9:4243" -api-enable-cors
1129
+    docker -d -H="192.168.1.9:4243" --api-enable-cors
1130 1130
 
... ...
@@ -1168,9 +1168,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1168 1168
 3.3 CORS Requests
1169 1169
 -----------------
1170 1170
 
1171
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1171
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1172 1172
 
1173 1173
 .. code-block:: bash
1174 1174
 
1175
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1175
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
1176 1176
 
... ...
@@ -1137,8 +1137,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1137 1137
 3.3 CORS Requests
1138 1138
 -----------------
1139 1139
 
1140
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1140
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1141 1141
 
1142 1142
 .. code-block:: bash
1143 1143
 
1144
- docker -d -H="192.168.1.9:4243" -api-enable-cors
1144
+ docker -d -H="192.168.1.9:4243" --api-enable-cors
... ...
@@ -1274,9 +1274,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1274 1274
 3.3 CORS Requests
1275 1275
 -----------------
1276 1276
 
1277
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1277
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1278 1278
 
1279 1279
 .. code-block:: bash
1280 1280
 
1281
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1281
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
1282 1282
 
... ...
@@ -1254,9 +1254,9 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1254 1254
 3.3 CORS Requests
1255 1255
 -----------------
1256 1256
 
1257
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1257
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1258 1258
 
1259 1259
 .. code-block:: bash
1260 1260
 
1261
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1261
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
1262 1262
 
... ...
@@ -1287,8 +1287,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1287 1287
 3.3 CORS Requests
1288 1288
 -----------------
1289 1289
 
1290
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1290
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1291 1291
 
1292 1292
 .. code-block:: bash
1293 1293
 
1294
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1294
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
... ...
@@ -1288,8 +1288,8 @@ In this version of the API, /attach, uses hijacking to transport stdin, stdout a
1288 1288
 3.3 CORS Requests
1289 1289
 -----------------
1290 1290
 
1291
-To enable cross origin requests to the remote api add the flag "-api-enable-cors" when running docker in daemon mode.
1291
+To enable cross origin requests to the remote api add the flag "--api-enable-cors" when running docker in daemon mode.
1292 1292
 
1293 1293
 .. code-block:: bash
1294 1294
 
1295
-   docker -d -H="192.168.1.9:4243" -api-enable-cors
1295
+   docker -d -H="192.168.1.9:4243" --api-enable-cors
... ...
@@ -193,7 +193,7 @@ well.
193 193
 
194 194
 When used in the shell or exec formats, the ``CMD`` instruction sets
195 195
 the command to be executed when running the image.  This is
196
-functionally equivalent to running ``docker commit -run '{"Cmd":
196
+functionally equivalent to running ``docker commit --run '{"Cmd":
197 197
 <command>}'`` outside the builder.
198 198
 
199 199
 If you use the *shell* form of the CMD, then the ``<command>`` will
... ...
@@ -235,7 +235,7 @@ override the default specified in CMD.
235 235
     ``EXPOSE <port> [<port>...]``
236 236
 
237 237
 The ``EXPOSE`` instruction exposes ports for use within links. This is
238
-functionally equivalent to running ``docker commit -run '{"PortSpecs":
238
+functionally equivalent to running ``docker commit --run '{"PortSpecs":
239 239
 ["<port>", "<port2>"]}'`` outside the builder. Refer to
240 240
 :ref:`port_redirection` for detailed information.
241 241
 
... ...
@@ -52,7 +52,7 @@ Sometimes this can use a more complex value string, as for ``-v``::
52 52
 Strings and Integers
53 53
 ~~~~~~~~~~~~~~~~~~~~
54 54
 
55
-Options like ``-name=""`` expect a string, and they can only be
55
+Options like ``--name=""`` expect a string, and they can only be
56 56
 specified once. Options like ``-c=0`` expect an integer, and they can
57 57
 only be specified once.
58 58
 
... ...
@@ -94,7 +94,7 @@ daemon and client.  To run the daemon you provide the ``-d`` flag.
94 94
 
95 95
 To force Docker to use devicemapper as the storage driver, use ``docker -d -s devicemapper``.
96 96
 
97
-To set the DNS server for all Docker containers, use ``docker -d -dns 8.8.8.8``.
97
+To set the DNS server for all Docker containers, use ``docker -d --dns 8.8.8.8``.
98 98
 
99 99
 To run the daemon with debug output, use ``docker -d -D``.
100 100
 
... ...
@@ -305,7 +305,7 @@ by using the ``git://`` schema.
305 305
       -m, --message="": Commit message
306 306
       -a, --author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
307 307
       --run="": Configuration changes to be applied when the image is launched with `docker run`.
308
-               (ex: -run='{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
308
+               (ex: --run='{"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
309 309
 
310 310
 .. _cli_commit_examples:
311 311
 
... ...
@@ -335,9 +335,9 @@ run ``ls /etc``.
335 335
 
336 336
 .. code-block:: bash
337 337
 
338
-        $ docker run -t -name test ubuntu ls
338
+        $ docker run -t --name test ubuntu ls
339 339
         bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  selinux  srv  sys  tmp  usr  var
340
-        $ docker commit -run='{"Cmd": ["ls","/etc"]}' test test2
340
+        $ docker commit --run='{"Cmd": ["ls","/etc"]}' test test2
341 341
         933d16de9e70005304c1717b5c6f2f39d6fd50752834c6f34a155c70790011eb
342 342
         $ docker run -t test2
343 343
         adduser.conf            gshadow          login.defs           rc0.d
... ...
@@ -358,7 +358,7 @@ Say you have a Dockerfile like so:
358 358
         CMD ["/usr/sbin/sshd -D"]
359 359
         ...
360 360
 
361
-If you run that, make some changes, and then commit, Docker will merge the environment variable and exposed port configuration settings with any that you specify in the -run= option. This is a change from Docker 0.8.0 and prior where no attempt was made to preserve any existing configuration on commit.
361
+If you run that, make some changes, and then commit, Docker will merge the environment variable and exposed port configuration settings with any that you specify in the --run= option. This is a change from Docker 0.8.0 and prior where no attempt was made to preserve any existing configuration on commit.
362 362
 
363 363
 .. code-block:: bash
364 364
 
... ...
@@ -366,14 +366,14 @@ If you run that, make some changes, and then commit, Docker will merge the envir
366 366
         $ docker run -t -i me/foo /bin/bash
367 367
         foo-container$ [make changes in the container]
368 368
         foo-container$ exit
369
-        $ docker commit -run='{"Cmd": ["ls"]}' [container-id] me/bar
369
+        $ docker commit --run='{"Cmd": ["ls"]}' [container-id] me/bar
370 370
         ...
371 371
 
372 372
 The me/bar image will now have port 22 exposed, MYVAR env var set to 'foobar', and its default command will be ["ls"].
373 373
 
374
-Note that this is currently a shallow merge. So, for example, if you had specified a new port spec in the -run= config above, that would have clobbered the 'EXPOSE 22' setting from the parent container.
374
+Note that this is currently a shallow merge. So, for example, if you had specified a new port spec in the --run= config above, that would have clobbered the 'EXPOSE 22' setting from the parent container.
375 375
 
376
-Full -run example
376
+Full --run example
377 377
 .................
378 378
 
379 379
 The ``--run`` JSON hash changes the ``Config`` section when running ``docker inspect CONTAINERID``
... ...
@@ -384,7 +384,7 @@ not overridden in the JSON hash will be merged in.
384 384
 
385 385
 .. code-block:: bash
386 386
 
387
-  $ sudo docker commit -run='
387
+  $ sudo docker commit --run='
388 388
   {
389 389
       "Entrypoint" : null,
390 390
       "Privileged" : false,
... ...
@@ -516,16 +516,16 @@ Show events in the past from a specified time
516 516
 
517 517
 .. code-block:: bash
518 518
 
519
-    $ sudo docker events -since 1378216169
519
+    $ sudo docker events --since 1378216169
520 520
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
521 521
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
522 522
 
523
-    $ sudo docker events -since '2013-09-03'
523
+    $ sudo docker events --since '2013-09-03'
524 524
     [2013-09-03 15:49:26 +0200 CEST] 4386fb97867d: (from 12de384bfb10) start
525 525
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
526 526
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
527 527
 
528
-    $ sudo docker events -since '2013-09-03 15:49:29 +0200 CEST'
528
+    $ sudo docker events --since '2013-09-03 15:49:29 +0200 CEST'
529 529
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) die
530 530
     [2013-09-03 15:49:29 +0200 CEST] 4386fb97867d: (from 12de384bfb10) stop
531 531
 
... ...
@@ -829,7 +829,7 @@ text output:
829 829
 
830 830
 .. code-block:: bash
831 831
 
832
-    $ sudo docker inspect -format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
832
+    $ sudo docker inspect --format='{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' $INSTANCE_ID
833 833
 
834 834
 Find a Specific Port Mapping
835 835
 ............................
... ...
@@ -844,7 +844,7 @@ we ask for the ``HostPort`` field to get the public address.
844 844
 
845 845
 .. code-block:: bash
846 846
 
847
-    $ sudo docker inspect -format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
847
+    $ sudo docker inspect --format='{{(index (index .NetworkSettings.Ports "8787/tcp") 0).HostPort}}' $INSTANCE_ID
848 848
 
849 849
 Get config
850 850
 ..........
... ...
@@ -856,7 +856,7 @@ to convert config object into JSON
856 856
 
857 857
 .. code-block:: bash
858 858
 
859
-    $ sudo docker inspect -format='{{json .config}}' $INSTANCE_ID
859
+    $ sudo docker inspect --format='{{json .config}}' $INSTANCE_ID
860 860
 
861 861
 
862 862
 .. _cli_kill:
... ...
@@ -1151,7 +1151,7 @@ image is removed.
1151 1151
       --volumes-from="": Mount all volumes from the given container(s)
1152 1152
       --entrypoint="": Overwrite the default entrypoint set by the image
1153 1153
       -w, --workdir="": Working directory inside the container
1154
-      --lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
1154
+      --lxc-conf=[]: Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
1155 1155
       --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
1156 1156
       --expose=[]: Expose a port from the container without publishing it to your host
1157 1157
       --link="": Add link to another container (name:alias)
... ...
@@ -1171,7 +1171,7 @@ See :ref:`port_redirection` for more detailed information about the ``--expose``
1171 1171
 ``-p``, ``-P`` and ``--link`` parameters, and :ref:`working_with_links_names` for
1172 1172
 specific examples using ``--link``.
1173 1173
 
1174
-Known Issues (run -volumes-from)
1174
+Known Issues (run --volumes-from)
1175 1175
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1176 1176
 
1177 1177
 * :issue:`2702`: "lxc-start: Permission denied - failed to mount"
... ...
@@ -1199,7 +1199,7 @@ error. Docker will close this file when ``docker run`` exits.
1199 1199
 
1200 1200
 This will *not* work, because by default, most potentially dangerous
1201 1201
 kernel capabilities are dropped; including ``cap_sys_admin`` (which is
1202
-required to mount filesystems). However, the ``-privileged`` flag will
1202
+required to mount filesystems). However, the ``--privileged`` flag will
1203 1203
 allow it to run:
1204 1204
 
1205 1205
 .. code-block:: bash
... ...
@@ -1211,7 +1211,7 @@ allow it to run:
1211 1211
    none            1.9G     0  1.9G   0% /mnt
1212 1212
 
1213 1213
 
1214
-The ``-privileged`` flag gives *all* capabilities to the container,
1214
+The ``--privileged`` flag gives *all* capabilities to the container,
1215 1215
 and it also lifts all the limitations enforced by the ``device``
1216 1216
 cgroup controller. In other words, the container can then do almost
1217 1217
 everything that the host can do. This flag exists to allow special
... ...
@@ -1313,7 +1313,7 @@ This example shows 5 containers that might be set up to test a web application c
1313 1313
 2. Start a pre-prepared ``riakserver`` image, give the container name ``riak`` and expose port ``8098`` to any containers that link to it;
1314 1314
 3. Start the ``appserver`` image, restricting its memory usage to 100MB, setting two environment variables ``DEVELOPMENT`` and ``BRANCH`` and bind-mounting the current directory (``$(pwd)``) in the container in read-only mode as ``/app/bin``;
1315 1315
 4. Start the ``webserver``, mapping port ``443`` in the container to port ``1443`` on the Docker server, setting the DNS server to ``dns.dev.org``, creating a volume to put the log files into (so we can access it from another container), then importing the files from the volume exposed by the ``static`` container, and linking to all exposed ports from ``riak`` and ``app``. Lastly, we set the hostname to ``web.sven.dev.org`` so its consistent with the pre-generated SSL certificate;
1316
-5. Finally, we create a container that runs ``tail -f access.log`` using the logs volume from the ``web`` container, setting the workdir to ``/var/log/httpd``. The ``-rm`` option means that when the container exits, the container's layer is removed.
1316
+5. Finally, we create a container that runs ``tail -f access.log`` using the logs volume from the ``web`` container, setting the workdir to ``/var/log/httpd``. The ``--rm`` option means that when the container exits, the container's layer is removed.
1317 1317
 
1318 1318
 
1319 1319
 .. _cli_save:
... ...
@@ -80,7 +80,7 @@ through network connections or shared volumes because the container is
80 80
 no longer listening to the commandline where you executed ``docker
81 81
 run``. You can reattach to a detached container with ``docker``
82 82
 :ref:`cli_attach`. If you choose to run a container in the detached
83
-mode, then you cannot use the ``-rm`` option.
83
+mode, then you cannot use the ``--rm`` option.
84 84
 
85 85
 Foreground
86 86
 ..........
... ...
@@ -92,10 +92,10 @@ error. It can even pretend to be a TTY (this is what most commandline
92 92
 executables expect) and pass along signals. All of that is
93 93
 configurable::
94 94
 
95
-   -a=[]          : Attach to ``stdin``, ``stdout`` and/or ``stderr``
96
-   -t=false       : Allocate a pseudo-tty
97
-   -sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
98
-   -i=false       : Keep STDIN open even if not attached
95
+   -a=[]           : Attach to ``stdin``, ``stdout`` and/or ``stderr``
96
+   -t=false        : Allocate a pseudo-tty
97
+   --sig-proxy=true: Proxify all received signal to the process (even in non-tty mode)
98
+   -i=false        : Keep STDIN open even if not attached
99 99
 
100 100
 If you do not specify ``-a`` then Docker will `attach everything
101 101
 (stdin,stdout,stderr)
... ...
@@ -112,7 +112,7 @@ as well as persistent standard input (``stdin``), so you'll use ``-i
112 112
 Container Identification
113 113
 ------------------------
114 114
 
115
-Name (-name)
115
+Name (--name)
116 116
 ............
117 117
 
118 118
 The operator can identify a container in three ways:
... ...
@@ -122,7 +122,7 @@ The operator can identify a container in three ways:
122 122
 * Name ("evil_ptolemy")
123 123
 
124 124
 The UUID identifiers come from the Docker daemon, and if you do not
125
-assign a name to the container with ``-name`` then the daemon will
125
+assign a name to the container with ``--name`` then the daemon will
126 126
 also generate a random string name too. The name can become a handy
127 127
 way to add meaning to a container since you can use this name when
128 128
 defining :ref:`links <working_with_links_names>` (or any other place
... ...
@@ -137,7 +137,7 @@ container ID out to a file of your choosing. This is similar to how
137 137
 some programs might write out their process ID to a file (you've seen
138 138
 them as PID files)::
139 139
 
140
-      -cidfile="": Write the container ID to the file
140
+      --cidfile="": Write the container ID to the file
141 141
 
142 142
 Network Settings
143 143
 ----------------
... ...
@@ -145,7 +145,7 @@ Network Settings
145 145
 ::
146 146
 
147 147
    -n=true   : Enable networking for this container
148
-   -dns=[]   : Set custom dns servers for the container
148
+   --dns=[]  : Set custom dns servers for the container
149 149
 
150 150
 By default, all containers have networking enabled and they can make
151 151
 any outgoing connections. The operator can completely disable
... ...
@@ -154,9 +154,9 @@ networking. In cases like this, you would perform I/O through files or
154 154
 STDIN/STDOUT only.
155 155
 
156 156
 Your container will use the same DNS servers as the host by default,
157
-but you can override this with ``-dns``.
157
+but you can override this with ``--dns``.
158 158
 
159
-Clean Up (-rm)
159
+Clean Up (--rm)
160 160
 --------------
161 161
 
162 162
 By default a container's file system persists even after the container
... ...
@@ -165,9 +165,9 @@ final state) and you retain all your data by default. But if you are
165 165
 running short-term **foreground** processes, these container file
166 166
 systems can really pile up. If instead you'd like Docker to
167 167
 **automatically clean up the container and remove the file system when
168
-the container exits**, you can add the ``-rm`` flag::
168
+the container exits**, you can add the ``--rm`` flag::
169 169
 
170
-   -rm=false: Automatically remove the container when it exits (incompatible with -d)
170
+   --rm=false: Automatically remove the container when it exits (incompatible with -d)
171 171
 
172 172
 
173 173
 Runtime Constraints on CPU and Memory
... ...
@@ -193,8 +193,8 @@ Runtime Privilege and LXC Configuration
193 193
 
194 194
 ::
195 195
 
196
-   -privileged=false: Give extended privileges to this container
197
-   -lxc-conf=[]: Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
196
+   --privileged=false: Give extended privileges to this container
197
+   --lxc-conf=[]: Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
198 198
 
199 199
 By default, Docker containers are "unprivileged" and cannot, for
200 200
 example, run a Docker daemon inside a Docker container. This is
... ...
@@ -203,16 +203,16 @@ but a "privileged" container is given access to all devices (see
203 203
 lxc-template.go_ and documentation on `cgroups devices
204 204
 <https://www.kernel.org/doc/Documentation/cgroups/devices.txt>`_).
205 205
 
206
-When the operator executes ``docker run -privileged``, Docker will
206
+When the operator executes ``docker run --privileged``, Docker will
207 207
 enable to access to all devices on the host as well as set some
208 208
 configuration in AppArmor to allow the container nearly all the same
209 209
 access to the host as processes running outside containers on the
210
-host. Additional information about running with ``-privileged`` is
210
+host. Additional information about running with ``--privileged`` is
211 211
 available on the `Docker Blog
212 212
 <http://blog.docker.io/2013/09/docker-can-now-run-within-docker/>`_.
213 213
 
214 214
 An operator can also specify LXC options using one or more
215
-``-lxc-conf`` parameters. These can be new parameters or override
215
+``--lxc-conf`` parameters. These can be new parameters or override
216 216
 existing parameters from the lxc-template.go_. Note that in the
217 217
 future, a given host's Docker daemon may not use LXC, so this is an
218 218
 implementation-specific configuration meant for operators already
... ...
@@ -260,7 +260,7 @@ ENTRYPOINT (Default Command to Execute at Runtime
260 260
 
261 261
 ::
262 262
 
263
-   -entrypoint="": Overwrite the default entrypoint set by the image
263
+   --entrypoint="": Overwrite the default entrypoint set by the image
264 264
 
265 265
 The ENTRYPOINT of an image is similar to a ``COMMAND`` because it
266 266
 specifies what executable to run when the container starts, but it is
... ...
@@ -274,12 +274,12 @@ runtime by using a string to specify the new ``ENTRYPOINT``. Here is an
274 274
 example of how to run a shell in a container that has been set up to
275 275
 automatically run something else (like ``/usr/bin/redis-server``)::
276 276
 
277
-  docker run -i -t -entrypoint /bin/bash example/redis
277
+  docker run -i -t --entrypoint /bin/bash example/redis
278 278
 
279 279
 or two examples of how to pass more parameters to that ENTRYPOINT::
280 280
 
281
-  docker run -i -t -entrypoint /bin/bash example/redis -c ls -l
282
-  docker run -i -t -entrypoint /usr/bin/redis-cli example/redis --help
281
+  docker run -i -t --entrypoint /bin/bash example/redis -c ls -l
282
+  docker run -i -t --entrypoint /usr/bin/redis-cli example/redis --help
283 283
 
284 284
 
285 285
 EXPOSE (Incoming Ports)
... ...
@@ -290,16 +290,16 @@ providing the ``EXPOSE`` instruction to give a hint to the operator
290 290
 about what incoming ports might provide services. The following
291 291
 options work with or override the ``Dockerfile``'s exposed defaults::
292 292
 
293
-   -expose=[]: Expose a port from the container 
293
+   --expose=[]: Expose a port from the container 
294 294
                without publishing it to your host
295
-   -P=false  : Publish all exposed ports to the host interfaces
296
-   -p=[]     : Publish a container's port to the host (format: 
297
-               ip:hostPort:containerPort | ip::containerPort | 
298
-               hostPort:containerPort) 
299
-               (use 'docker port' to see the actual mapping)
300
-   -link=""  : Add link to another container (name:alias)
301
-
302
-As mentioned previously, ``EXPOSE`` (and ``-expose``) make a port
295
+   -P=false   : Publish all exposed ports to the host interfaces
296
+   -p=[]      : Publish a container's port to the host (format: 
297
+                ip:hostPort:containerPort | ip::containerPort | 
298
+                hostPort:containerPort) 
299
+                (use 'docker port' to see the actual mapping)
300
+   --link=""  : Add link to another container (name:alias)
301
+
302
+As mentioned previously, ``EXPOSE`` (and ``--expose``) make a port
303 303
 available **in** a container for incoming connections. The port number
304 304
 on the inside of the container (where the service listens) does not
305 305
 need to be the same number as the port exposed on the outside of the
... ...
@@ -308,16 +308,16 @@ have an HTTP service listening on port 80 (and so you ``EXPOSE 80`` in
308 308
 the ``Dockerfile``), but outside the container the port might be 42800.
309 309
 
310 310
 To help a new client container reach the server container's internal
311
-port operator ``-expose``'d by the operator or ``EXPOSE``'d by the
311
+port operator ``--expose``'d by the operator or ``EXPOSE``'d by the
312 312
 developer, the operator has three choices: start the server container
313
-with ``-P`` or ``-p,`` or start the client container with ``-link``.
313
+with ``-P`` or ``-p,`` or start the client container with ``--link``.
314 314
 
315 315
 If the operator uses ``-P`` or ``-p`` then Docker will make the
316 316
 exposed port accessible on the host and the ports will be available to
317 317
 any client that can reach the host. To find the map between the host
318 318
 ports and the exposed ports, use ``docker port``)
319 319
 
320
-If the operator uses ``-link`` when starting the new client container,
320
+If the operator uses ``--link`` when starting the new client container,
321 321
 then the client container can access the exposed port via a private
322 322
 networking interface. Docker will set some environment variables in
323 323
 the client container to help indicate which interface and port to use.
... ...
@@ -329,7 +329,7 @@ The operator can **set any environment variable** in the container by
329 329
 using one or more ``-e`` flags, even overriding those already defined by the
330 330
 developer with a Dockefile ``ENV``::
331 331
 
332
-   $ docker run -e "deep=purple" -rm ubuntu /bin/bash -c export
332
+   $ docker run -e "deep=purple" --rm ubuntu /bin/bash -c export
333 333
    declare -x HOME="/"
334 334
    declare -x HOSTNAME="85bc26a0e200"
335 335
    declare -x OLDPWD
... ...
@@ -341,13 +341,13 @@ developer with a Dockefile ``ENV``::
341 341
 
342 342
 Similarly the operator can set the **hostname** with ``-h``.
343 343
 
344
-``-link name:alias`` also sets environment variables, using the
344
+``--link name:alias`` also sets environment variables, using the
345 345
 *alias* string to define environment variables within the container
346 346
 that give the IP and PORT information for connecting to the service
347 347
 container. Let's imagine we have a container running Redis::
348 348
 
349 349
    # Start the service container, named redis-name
350
-   $ docker run -d -name redis-name dockerfiles/redis
350
+   $ docker run -d --name redis-name dockerfiles/redis
351 351
    4241164edf6f5aca5b0e9e4c9eccd899b0b8080c64c0cd26efe02166c73208f3
352 352
 
353 353
    # The redis-name container exposed port 6379
... ...
@@ -361,12 +361,12 @@ container. Let's imagine we have a container running Redis::
361 361
 
362 362
 
363 363
 Yet we can get information about the Redis container's exposed ports
364
-with ``-link``. Choose an alias that will form a valid environment
364
+with ``--link``. Choose an alias that will form a valid environment
365 365
 variable!
366 366
 
367 367
 ::
368 368
 
369
-   $ docker run -rm -link redis-name:redis_alias -entrypoint /bin/bash dockerfiles/redis -c export
369
+   $ docker run --rm --link redis-name:redis_alias --entrypoint /bin/bash dockerfiles/redis -c export
370 370
    declare -x HOME="/"
371 371
    declare -x HOSTNAME="acda7f7b1cdc"
372 372
    declare -x OLDPWD
... ...
@@ -383,7 +383,7 @@ variable!
383 383
 
384 384
 And we can use that information to connect from another container as a client::
385 385
 
386
-   $ docker run -i -t -rm -link redis-name:redis_alias -entrypoint /bin/bash dockerfiles/redis -c '/redis-stable/src/redis-cli -h $REDIS_ALIAS_PORT_6379_TCP_ADDR -p $REDIS_ALIAS_PORT_6379_TCP_PORT'
386
+   $ docker run -i -t --rm --link redis-name:redis_alias --entrypoint /bin/bash dockerfiles/redis -c '/redis-stable/src/redis-cli -h $REDIS_ALIAS_PORT_6379_TCP_ADDR -p $REDIS_ALIAS_PORT_6379_TCP_PORT'
387 387
    172.17.0.32:6379>
388 388
 
389 389
 VOLUME (Shared Filesystems)
... ...
@@ -393,7 +393,7 @@ VOLUME (Shared Filesystems)
393 393
 
394 394
    -v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]. 
395 395
           If "container-dir" is missing, then docker creates a new volume.
396
-   -volumes-from="": Mount all volumes from the given container(s)
396
+   --volumes-from="": Mount all volumes from the given container(s)
397 397
 
398 398
 The volumes commands are complex enough to have their own
399 399
 documentation in section :ref:`volume_def`. A developer can define one
... ...
@@ -43,26 +43,26 @@ Start actual redis server on one Docker host
43 43
 
44 44
 .. code-block:: bash
45 45
 
46
-	big-server $ docker run -d -name redis crosbymichael/redis
46
+	big-server $ docker run -d --name redis crosbymichael/redis
47 47
 
48 48
 Then add an ambassador linked to the redis server, mapping a port to the outside world
49 49
 
50 50
 .. code-block:: bash
51 51
 
52
-	big-server $ docker run -d -link redis:redis -name redis_ambassador -p 6379:6379 svendowideit/ambassador
52
+	big-server $ docker run -d --link redis:redis --name redis_ambassador -p 6379:6379 svendowideit/ambassador
53 53
 
54 54
 On the other host, you can set up another ambassador setting environment variables for each remote port we want to proxy to the ``big-server``
55 55
 
56 56
 .. code-block:: bash
57 57
 
58
-	client-server $ docker run -d -name redis_ambassador -expose 6379 -e REDIS_PORT_6379_TCP=tcp://192.168.1.52:6379 svendowideit/ambassador
58
+	client-server $ docker run -d --name redis_ambassador --expose 6379 -e REDIS_PORT_6379_TCP=tcp://192.168.1.52:6379 svendowideit/ambassador
59 59
 
60 60
 Then on the ``client-server`` host, you can use a redis client container to talk 
61 61
 to the remote redis server, just by linking to the local redis ambassador.
62 62
 
63 63
 .. code-block:: bash
64 64
 
65
-	client-server $ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
65
+	client-server $ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
66 66
 	redis 172.17.0.160:6379> ping
67 67
 	PONG
68 68
 
... ...
@@ -79,19 +79,19 @@ On the docker host (192.168.1.52) that redis will run on:
79 79
 .. code-block:: bash
80 80
 
81 81
 	# start actual redis server
82
-	$ docker run -d -name redis crosbymichael/redis
82
+	$ docker run -d --name redis crosbymichael/redis
83 83
 
84 84
 	# get a redis-cli container for connection testing	
85 85
 	$ docker pull relateiq/redis-cli
86 86
 
87 87
 	# test the redis server by talking to it directly
88
-	$ docker run -t -i -rm -link redis:redis relateiq/redis-cli
88
+	$ docker run -t -i --rm --link redis:redis relateiq/redis-cli
89 89
 	redis 172.17.0.136:6379> ping
90 90
 	PONG
91 91
 	^D
92 92
 	
93 93
 	# add redis ambassador
94
-	$ docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 busybox sh
94
+	$ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 busybox sh
95 95
 	
96 96
 in the redis_ambassador container, you can see the linked redis containers's env
97 97
 
... ...
@@ -119,7 +119,7 @@ This environment is used by the ambassador socat script to expose redis to the w
119 119
 
120 120
 	$ docker rm redis_ambassador
121 121
 	$ sudo ./contrib/mkimage-unittest.sh
122
-	$ docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 docker-ut sh
122
+	$ docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 docker-ut sh
123 123
 	
124 124
 	$ socat TCP4-LISTEN:6379,fork,reuseaddr TCP4:172.17.0.136:6379
125 125
 	
... ...
@@ -127,7 +127,7 @@ then ping the redis server via the ambassador
127 127
 
128 128
 .. code-block::bash
129 129
 
130
-	$ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
130
+	$ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
131 131
 	redis 172.17.0.160:6379> ping
132 132
 	PONG
133 133
 
... ...
@@ -136,7 +136,7 @@ Now goto a different server
136 136
 .. code-block:: bash
137 137
 
138 138
 	$ sudo ./contrib/mkimage-unittest.sh
139
-	$ docker run -t -i  -expose 6379 -name redis_ambassador docker-ut sh
139
+	$ docker run -t -i  --expose 6379 --name redis_ambassador docker-ut sh
140 140
 	
141 141
 	$ socat TCP4-LISTEN:6379,fork,reuseaddr TCP4:192.168.1.52:6379
142 142
 
... ...
@@ -145,7 +145,7 @@ and get the redis-cli image so we can talk over the ambassador bridge
145 145
 .. code-block:: bash
146 146
 
147 147
 	$ docker pull relateiq/redis-cli
148
-	$ docker run -i -t -rm -link redis_ambassador:redis relateiq/redis-cli
148
+	$ docker run -i -t --rm --link redis_ambassador:redis relateiq/redis-cli
149 149
 	redis 172.17.0.160:6379> ping
150 150
 	PONG
151 151
 
... ...
@@ -157,7 +157,7 @@ When you start the container, it uses a small ``sed`` script to parse out the (p
157 157
 link environment variables to set up the port forwarding. On the remote host, you need to set the 
158 158
 variable using the ``-e`` command line option.
159 159
 
160
-``-expose 1234 -e REDIS_PORT_1234_TCP=tcp://192.168.1.52:6379`` will forward the 
160
+``--expose 1234 -e REDIS_PORT_1234_TCP=tcp://192.168.1.52:6379`` will forward the 
161 161
 local ``1234`` port to the remote IP and port - in this case ``192.168.1.52:6379``.
162 162
 
163 163
 
... ...
@@ -171,9 +171,9 @@ local ``1234`` port to the remote IP and port - in this case ``192.168.1.52:6379
171 171
 	#   docker build -t SvenDowideit/ambassador .
172 172
 	#   docker tag SvenDowideit/ambassador ambassador
173 173
 	# then to run it (on the host that has the real backend on it)
174
-	#   docker run -t -i -link redis:redis -name redis_ambassador -p 6379:6379 ambassador
174
+	#   docker run -t -i --link redis:redis --name redis_ambassador -p 6379:6379 ambassador
175 175
 	# on the remote host, you can set up another ambassador
176
-	#    docker run -t -i -name redis_ambassador -expose 6379 sh
176
+	#    docker run -t -i --name redis_ambassador --expose 6379 sh
177 177
 
178 178
 	FROM	docker-ut
179 179
 	MAINTAINER	SvenDowideit@home.org.au
... ...
@@ -39,7 +39,7 @@ Repository to a local image cache.
39 39
    12 character hash ``539c0211cd76: Download complete`` which is the
40 40
    short form of the image ID. These short image IDs are the first 12
41 41
    characters of the full image ID - which can be found using ``docker
42
-   inspect`` or ``docker images -notrunc=true``
42
+   inspect`` or ``docker images --no-trunc=true``
43 43
 
44 44
 Running an interactive shell
45 45
 ----------------------------
... ...
@@ -121,8 +121,8 @@ Container intercommunication
121 121
 The value of the Docker daemon's ``icc`` parameter determines whether
122 122
 containers can communicate with each other over the bridge network.
123 123
 
124
-- The default, ``-icc=true`` allows containers to communicate with each other.
125
-- ``-icc=false`` means containers are isolated from each other.
124
+- The default, ``--icc=true`` allows containers to communicate with each other.
125
+- ``--icc=false`` means containers are isolated from each other.
126 126
 
127 127
 Docker uses ``iptables`` under the hood to either accept or
128 128
 drop communication between containers.
... ...
@@ -114,14 +114,14 @@ exposure, is possible because ``client`` is started after ``server``
114 114
 has been started.
115 115
 
116 116
 Here is a full example. On ``server``, the port of interest is
117
-exposed. The exposure is done either through the ``-expose`` parameter
117
+exposed. The exposure is done either through the ``--expose`` parameter
118 118
 to the ``docker run`` command, or the ``EXPOSE`` build command in a
119 119
 Dockerfile:
120 120
 
121 121
 .. code-block:: bash
122 122
 
123 123
     # Expose port 80
124
-    docker run -expose 80 --name server <image> <cmd>
124
+    docker run --expose 80 --name server <image> <cmd>
125 125
 
126 126
 The ``client`` then links to the ``server``:
127 127
 
... ...
@@ -19,14 +19,14 @@ Container Naming
19 19
 
20 20
 .. versionadded:: v0.6.5
21 21
 
22
-You can now name your container by using the ``-name`` flag. If no
22
+You can now name your container by using the ``--name`` flag. If no
23 23
 name is provided, Docker will automatically generate a name. You can
24 24
 see this name using the ``docker ps`` command.
25 25
 
26 26
 .. code-block:: bash
27 27
 
28
-    # format is "sudo docker run -name <container_name> <image_name> <command>"
29
-    $ sudo docker run -name test ubuntu /bin/bash
28
+    # format is "sudo docker run --name <container_name> <image_name> <command>"
29
+    $ sudo docker run --name test ubuntu /bin/bash
30 30
 
31 31
     # the flag "-a" Show all containers. Only running containers are shown by default.
32 32
     $ sudo docker ps -a
... ...
@@ -41,9 +41,9 @@ Links: service discovery for docker
41 41
 .. versionadded:: v0.6.5
42 42
 
43 43
 Links allow containers to discover and securely communicate with each
44
-other by using the flag ``-link name:alias``. Inter-container
44
+other by using the flag ``--link name:alias``. Inter-container
45 45
 communication can be disabled with the daemon flag
46
-``-icc=false``. With this flag set to ``false``, Container A cannot
46
+``--icc=false``. With this flag set to ``false``, Container A cannot
47 47
 access Container B unless explicitly allowed via a link. This is a
48 48
 huge win for securing your containers.  When two containers are linked
49 49
 together Docker creates a parent child relationship between the
... ...
@@ -63,7 +63,7 @@ based on that image and run it as a daemon.
63 63
 
64 64
 .. code-block:: bash
65 65
 
66
-    $ sudo docker run -d -name redis crosbymichael/redis
66
+    $ sudo docker run -d --name redis crosbymichael/redis
67 67
 
68 68
 We can issue all the commands that you would expect using the name
69 69
 ``redis``; start, stop, attach, using the name for our container. The
... ...
@@ -77,9 +77,9 @@ we need to establish a link.
77 77
 
78 78
 .. code-block:: bash
79 79
 
80
-    $ sudo docker run -t -i -link redis:db -name webapp ubuntu bash
80
+    $ sudo docker run -t -i --link redis:db --name webapp ubuntu bash
81 81
 
82
-When you specified ``-link redis:db`` you are telling Docker to link
82
+When you specified ``--link redis:db`` you are telling Docker to link
83 83
 the container named ``redis`` into this new container with the alias
84 84
 ``db``. Environment variables are prefixed with the alias so that the
85 85
 parent container can access network and environment information from
... ...
@@ -42,14 +42,14 @@ two new volumes::
42 42
 This command will create the new container with two new volumes that 
43 43
 exits instantly (``true`` is pretty much the smallest, simplest program 
44 44
 that you can run). Once created you can mount its volumes in any other 
45
-container using the ``-volumes-from`` option; irrespective of whether the
45
+container using the ``--volumes-from`` option; irrespective of whether the
46 46
 container is running or not. 
47 47
 
48 48
 Or, you can use the VOLUME instruction in a Dockerfile to add one or more new
49 49
 volumes to any container created from that image::
50 50
 
51 51
   # BUILD-USING:        docker build -t data .
52
-  # RUN-USING:          docker run -name DATA data 
52
+  # RUN-USING:          docker run --name DATA data 
53 53
   FROM          busybox
54 54
   VOLUME        ["/var/volume1", "/var/volume2"]
55 55
   CMD           ["/bin/true"]
... ...
@@ -63,19 +63,19 @@ Data Volume Container, and then to mount the data from it.
63 63
 
64 64
 Create a named container with volumes to share (``/var/volume1`` and ``/var/volume2``)::
65 65
 
66
-  $ docker run -v /var/volume1 -v /var/volume2 -name DATA busybox true
66
+  $ docker run -v /var/volume1 -v /var/volume2 --name DATA busybox true
67 67
 
68 68
 Then mount those data volumes into your application containers::
69 69
 
70
-  $ docker run -t -i -rm -volumes-from DATA -name client1 ubuntu bash
70
+  $ docker run -t -i --rm --volumes-from DATA --name client1 ubuntu bash
71 71
 
72
-You can use multiple ``-volumes-from`` parameters to bring together multiple 
72
+You can use multiple ``--volumes-from`` parameters to bring together multiple 
73 73
 data volumes from multiple containers. 
74 74
 
75 75
 Interestingly, you can mount the volumes that came from the ``DATA`` container in 
76 76
 yet another container via the ``client1`` middleman container::
77 77
 
78
-  $ docker run -t -i -rm -volumes-from client1 -name client2 ubuntu bash
78
+  $ docker run -t -i --rm --volumes-from client1 --name client2 ubuntu bash
79 79
 
80 80
 This allows you to abstract the actual data source from users of that data, 
81 81
 similar to :ref:`ambassador_pattern_linking <ambassador_pattern_linking>`.
... ...
@@ -131,7 +131,7 @@ data-container's volume. For example::
131 131
 
132 132
     $ sudo docker run -rm --volumes-from DATA -v $(pwd):/backup busybox tar cvf /backup/backup.tar /data
133 133
 
134
-* ``-rm`` - remove the container when it exits
134
+* ``--rm`` - remove the container when it exits
135 135
 * ``--volumes-from DATA`` - attach to the volumes shared by the ``DATA`` container
136 136
 * ``-v $(pwd):/backup`` - bind mount the current directory into the container; to write the tar file to
137 137
 * ``busybox`` - a small simpler image - good for quick maintenance
... ...
@@ -142,11 +142,11 @@ Then to restore to the same container, or another that you've made elsewhere::
142 142
     # create a new data container
143 143
     $ sudo docker run -v /data -name DATA2 busybox true
144 144
     # untar the backup files into the new container's data volume
145
-    $ sudo docker run -rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
145
+    $ sudo docker run --rm --volumes-from DATA2 -v $(pwd):/backup busybox tar xvf /backup/backup.tar
146 146
     data/
147 147
     data/sven.txt
148 148
     # compare to the original container
149
-    $ sudo docker run -rm --volumes-from DATA -v `pwd`:/backup busybox ls /data
149
+    $ sudo docker run --rm --volumes-from DATA -v `pwd`:/backup busybox ls /data
150 150
     sven.txt
151 151
 
152 152
 
... ...
@@ -74,7 +74,7 @@ name or description:
74 74
 
75 75
     Search the docker index for images
76 76
 
77
-      -notrunc=false: Don't truncate output
77
+      --no-trunc=false: Don't truncate output
78 78
     $ sudo docker search centos
79 79
     Found 25 results matching your query ("centos")
80 80
     NAME                             DESCRIPTION
... ...
@@ -139,7 +139,7 @@ docker run \
139 139
        -e AWS_ACCESS_KEY \
140 140
        -e AWS_SECRET_KEY \
141 141
        -e GPG_PASSPHRASE \
142
-       -i -t -privileged \
142
+       -i -t --privileged \
143 143
        docker \
144 144
        hack/release.sh
145 145
 ```
... ...
@@ -173,7 +173,7 @@ docker run \
173 173
        -e AWS_ACCESS_KEY \
174 174
        -e AWS_SECRET_KEY \
175 175
        -e GPG_PASSPHRASE \
176
-       -i -t -privileged \
176
+       -i -t --privileged \
177 177
        docker \
178 178
        hack/release.sh
179 179
 ```
... ...
@@ -5,7 +5,7 @@
5 5
 # See the blog post: http://blog.docker.io/2013/09/docker-can-now-run-within-docker/
6 6
 #
7 7
 # This script should be executed inside a docker container in privilieged mode
8
-# ('docker run -privileged', introduced in docker 0.6).
8
+# ('docker run --privileged', introduced in docker 0.6).
9 9
 
10 10
 # Usage: dind CMD [ARG...]
11 11
 
... ...
@@ -17,7 +17,7 @@ CGROUP=/sys/fs/cgroup
17 17
 
18 18
 mountpoint -q $CGROUP || 
19 19
 	mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup $CGROUP || {
20
-		echo "Could not make a tmpfs mount. Did you use -privileged?"
20
+		echo "Could not make a tmpfs mount. Did you use --privileged?"
21 21
 		exit 1
22 22
 	}
23 23
 
... ...
@@ -1,8 +1,8 @@
1 1
 # DOCKER-VERSION: 0.7.6
2 2
 # AUTHOR:         Daniel Mizyrycki <daniel@dotcloud.com>
3 3
 # DESCRIPTION:    docker-ci continuous integration service
4
-# TO_BUILD:       docker build -rm -t docker-ci/docker-ci .
5
-# TO_RUN:         docker run -rm -i -t -p 8000:80 -p 2222:22 -v /run:/var/socket \
4
+# TO_BUILD:       docker build -t docker-ci/docker-ci .
5
+# TO_RUN:         docker run --rm -i -t -p 8000:80 -p 2222:22 -v /run:/var/socket \
6 6
 #                     -v /data/docker-ci:/data/docker-ci docker-ci/docker-ci
7 7
 
8 8
 from ubuntu:12.04
... ...
@@ -57,8 +57,8 @@ Production deployment
57 57
   export EMAIL_RCP=[EMAIL_FOR_BUILD_ERRORS]
58 58
 
59 59
   # Build docker-ci and testbuilder docker images
60
-  docker -H $DOCKER_PROD build -rm -t docker-ci/docker-ci .
61
-  (cd testbuilder; docker -H $DOCKER_PROD build -rm -t docker-ci/testbuilder .)
60
+  docker -H $DOCKER_PROD build -t docker-ci/docker-ci .
61
+  (cd testbuilder; docker -H $DOCKER_PROD build --rm -t docker-ci/testbuilder .)
62 62
 
63 63
   # Run docker-ci container ( assuming no previous container running )
64 64
   (cd dcr/prod; dcr docker-ci.yml start)
... ...
@@ -6,7 +6,7 @@ else
6 6
     AWS_S3_BUCKET='get-staging.docker.io'
7 7
 fi
8 8
 
9
-docker run -rm -privileged -v /run:/var/socket \
9
+docker run --rm --privileged -v /run:/var/socket \
10 10
     -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_ACCESS_KEY=$AWS_ACCESS_KEY \
11 11
     -e AWS_SECRET_KEY=$AWS_SECRET_KEY -e GPG_PASSPHRASE=$GPG_PASSPHRASE \
12 12
     -e DOCKER_RELEASE=1 -e DEPLOYMENT=$DEPLOYMENT docker-ci/testbuilder docker
... ...
@@ -3,6 +3,6 @@ set -x
3 3
 
4 4
 PROJECT_NAME=$(basename $0)
5 5
 
6
-docker run -rm -u sysadmin -e DEPLOYMENT=$DEPLOYMENT -v /run:/var/socket \
6
+docker run --rm -u sysadmin -e DEPLOYMENT=$DEPLOYMENT -v /run:/var/socket \
7 7
     -v /home/docker-ci/coverage/$PROJECT_NAME:/data docker-ci/testbuilder $PROJECT_NAME $1 $2 $3
8 8
 
... ...
@@ -1,5 +1,5 @@
1
-# TO_BUILD:      docker build -rm -no-cache -t docker-ci/testbuilder .
2
-# TO_RUN:        docker run -rm -u sysadmin \
1
+# TO_BUILD:      docker build --no-cache -t docker-ci/testbuilder .
2
+# TO_RUN:        docker run --rm -u sysadmin \
3 3
 #                -v /run:/var/socket docker-ci/testbuilder docker-registry
4 4
 #
5 5
 
... ...
@@ -5,8 +5,8 @@ PROJECT_PATH=$1
5 5
 
6 6
 # Build the docker project
7 7
 cd /data/$PROJECT_PATH
8
-sg docker -c "docker build -q -rm -t registry ."
9
-cd test; sg docker -c "docker build -q -rm -t docker-registry-test ."
8
+sg docker -c "docker build -q -t registry ."
9
+cd test; sg docker -c "docker build -q -t docker-registry-test ."
10 10
 
11 11
 # Run the tests
12
-sg docker -c "docker run -rm -v /home/docker-ci/coverage/docker-registry:/data docker-registry-test"
12
+sg docker -c "docker run --rm -v /home/docker-ci/coverage/docker-registry:/data docker-registry-test"
... ...
@@ -5,14 +5,14 @@ PROJECT_PATH=$1
5 5
 
6 6
 # Build the docker project
7 7
 cd /data/$PROJECT_PATH
8
-sg docker -c "docker build -q -rm -t docker ."
8
+sg docker -c "docker build -q -t docker ."
9 9
 
10 10
 if [ "$DOCKER_RELEASE" == "1" ]; then
11 11
     # Do nightly release
12
-    echo sg docker -c "docker run -rm -privileged -v /run:/var/socket -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_ACCESS_KEY= -e AWS_SECRET_KEY= -e GPG_PASSPHRASE= docker hack/release.sh"
12
+    echo sg docker -c "docker run --rm --privileged -v /run:/var/socket -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_ACCESS_KEY= -e AWS_SECRET_KEY= -e GPG_PASSPHRASE= docker hack/release.sh"
13 13
     set +x
14
-    sg docker -c "docker run -rm -privileged -v /run:/var/socket -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_ACCESS_KEY=$AWS_ACCESS_KEY -e AWS_SECRET_KEY=$AWS_SECRET_KEY -e GPG_PASSPHRASE=$GPG_PASSPHRASE docker hack/release.sh"
14
+    sg docker -c "docker run --rm --privileged -v /run:/var/socket -e AWS_S3_BUCKET=$AWS_S3_BUCKET -e AWS_ACCESS_KEY=$AWS_ACCESS_KEY -e AWS_SECRET_KEY=$AWS_SECRET_KEY -e GPG_PASSPHRASE=$GPG_PASSPHRASE docker hack/release.sh"
15 15
 else
16 16
     # Run the tests
17
-    sg docker -c "docker run -rm -privileged -v /home/docker-ci/coverage/docker:/data docker ./hack/infrastructure/docker-ci/docker-coverage/gocoverage.sh"
17
+    sg docker -c "docker run --rm --privileged -v /home/docker-ci/coverage/docker:/data docker ./hack/infrastructure/docker-ci/docker-coverage/gocoverage.sh"
18 18
 fi
... ...
@@ -31,7 +31,7 @@ docker run -e AWS_S3_BUCKET=get-staging.docker.io \
31 31
            -e AWS_ACCESS_KEY=AKI1234... \
32 32
            -e AWS_SECRET_KEY=sEs4mE... \
33 33
            -e GPG_PASSPHRASE=m0resEs4mE... \
34
-           -i -t -privileged \
34
+           -i -t --privileged \
35 35
            docker ./hack/release.sh
36 36
 EOF
37 37
 	exit 1
... ...
@@ -739,7 +739,7 @@ func TestRunAutoRemove(t *testing.T) {
739 739
 	c := make(chan struct{})
740 740
 	go func() {
741 741
 		defer close(c)
742
-		if err := cli.CmdRun("-rm", unitTestImageID, "hostname"); err != nil {
742
+		if err := cli.CmdRun("--rm", unitTestImageID, "hostname"); err != nil {
743 743
 			t.Fatal(err)
744 744
 		}
745 745
 	}()
... ...
@@ -1580,7 +1580,7 @@ func TestPrivilegedCanMknod(t *testing.T) {
1580 1580
 	eng := NewTestEngine(t)
1581 1581
 	runtime := mkRuntimeFromEngine(eng, t)
1582 1582
 	defer runtime.Nuke()
1583
-	if output, err := runContainer(eng, runtime, []string{"-privileged", "_", "sh", "-c", "mknod /tmp/sda b 8 0 && echo ok"}, t); output != "ok\n" {
1583
+	if output, err := runContainer(eng, runtime, []string{"--privileged", "_", "sh", "-c", "mknod /tmp/sda b 8 0 && echo ok"}, t); output != "ok\n" {
1584 1584
 		t.Fatalf("Could not mknod into privileged container %s %v", output, err)
1585 1585
 	}
1586 1586
 }
... ...
@@ -1589,7 +1589,7 @@ func TestPrivilegedCanMount(t *testing.T) {
1589 1589
 	eng := NewTestEngine(t)
1590 1590
 	runtime := mkRuntimeFromEngine(eng, t)
1591 1591
 	defer runtime.Nuke()
1592
-	if output, _ := runContainer(eng, runtime, []string{"-privileged", "_", "sh", "-c", "mount -t tmpfs none /tmp && echo ok"}, t); output != "ok\n" {
1592
+	if output, _ := runContainer(eng, runtime, []string{"--privileged", "_", "sh", "-c", "mount -t tmpfs none /tmp && echo ok"}, t); output != "ok\n" {
1593 1593
 		t.Fatal("Could not mount into privileged container")
1594 1594
 	}
1595 1595
 }
... ...
@@ -203,7 +203,7 @@ func TestCreateRmRunning(t *testing.T) {
203 203
 	eng := NewTestEngine(t)
204 204
 	defer mkRuntimeFromEngine(eng, t).Nuke()
205 205
 
206
-	config, hostConfig, _, err := runconfig.Parse([]string{"-name", "foo", unitTestImageID, "sleep 300"}, nil)
206
+	config, hostConfig, _, err := runconfig.Parse([]string{"--name", "foo", unitTestImageID, "sleep 300"}, nil)
207 207
 	if err != nil {
208 208
 		t.Fatal(err)
209 209
 	}
... ...
@@ -20,21 +20,21 @@ func mustParse(t *testing.T, args string) (*Config, *HostConfig) {
20 20
 }
21 21
 
22 22
 func TestParseRunLinks(t *testing.T) {
23
-	if _, hostConfig := mustParse(t, "-link a:b"); len(hostConfig.Links) == 0 || hostConfig.Links[0] != "a:b" {
23
+	if _, hostConfig := mustParse(t, "--link a:b"); len(hostConfig.Links) == 0 || hostConfig.Links[0] != "a:b" {
24 24
 		t.Fatalf("Error parsing links. Expected []string{\"a:b\"}, received: %v", hostConfig.Links)
25 25
 	}
26
-	if _, hostConfig := mustParse(t, "-link a:b -link c:d"); len(hostConfig.Links) < 2 || hostConfig.Links[0] != "a:b" || hostConfig.Links[1] != "c:d" {
26
+	if _, hostConfig := mustParse(t, "--link a:b --link c:d"); len(hostConfig.Links) < 2 || hostConfig.Links[0] != "a:b" || hostConfig.Links[1] != "c:d" {
27 27
 		t.Fatalf("Error parsing links. Expected []string{\"a:b\", \"c:d\"}, received: %v", hostConfig.Links)
28 28
 	}
29 29
 	if _, hostConfig := mustParse(t, ""); len(hostConfig.Links) != 0 {
30 30
 		t.Fatalf("Error parsing links. No link expected, received: %v", hostConfig.Links)
31 31
 	}
32 32
 
33
-	if _, _, err := parse(t, "-link a"); err == nil {
34
-		t.Fatalf("Error parsing links. `-link a` should be an error but is not")
33
+	if _, _, err := parse(t, "--link a"); err == nil {
34
+		t.Fatalf("Error parsing links. `--link a` should be an error but is not")
35 35
 	}
36
-	if _, _, err := parse(t, "-link"); err == nil {
37
-		t.Fatalf("Error parsing links. `-link` should be an error but is not")
36
+	if _, _, err := parse(t, "--link"); err == nil {
37
+		t.Fatalf("Error parsing links. `--link` should be an error but is not")
38 38
 	}
39 39
 }
40 40
 
... ...
@@ -73,8 +73,8 @@ func TestParseRunAttach(t *testing.T) {
73 73
 	if _, _, err := parse(t, "-a stderr -d"); err == nil {
74 74
 		t.Fatalf("Error parsing attach flags, `-a stderr -d` should be an error but is not")
75 75
 	}
76
-	if _, _, err := parse(t, "-d -rm"); err == nil {
77
-		t.Fatalf("Error parsing attach flags, `-d -rm` should be an error but is not")
76
+	if _, _, err := parse(t, "-d --rm"); err == nil {
77
+		t.Fatalf("Error parsing attach flags, `-d --rm` should be an error but is not")
78 78
 	}
79 79
 }
80 80
 
... ...
@@ -15,7 +15,7 @@ import (
15 15
 var (
16 16
 	ErrInvalidWorikingDirectory = fmt.Errorf("The working directory is invalid. It needs to be an absolute path.")
17 17
 	ErrConflictAttachDetach     = fmt.Errorf("Conflicting options: -a and -d")
18
-	ErrConflictDetachAutoRemove = fmt.Errorf("Conflicting options: -rm and -d")
18
+	ErrConflictDetachAutoRemove = fmt.Errorf("Conflicting options: --rm and -d")
19 19
 )
20 20
 
21 21
 //FIXME Only used in tests
... ...
@@ -74,7 +74,7 @@ func parseRun(cmd *flag.FlagSet, args []string, sysInfo *sysinfo.SysInfo) (*Conf
74 74
 	cmd.Var(&flExpose, []string{"#expose", "-expose"}, "Expose a port from the container without publishing it to your host")
75 75
 	cmd.Var(&flDns, []string{"#dns", "-dns"}, "Set custom dns servers")
76 76
 	cmd.Var(&flVolumesFrom, []string{"#volumes-from", "-volumes-from"}, "Mount volumes from the specified container(s)")
77
-	cmd.Var(&flLxcOpts, []string{"#lxc-conf", "-lxc-conf"}, "Add custom lxc options -lxc-conf=\"lxc.cgroup.cpuset.cpus = 0,1\"")
77
+	cmd.Var(&flLxcOpts, []string{"#lxc-conf", "-lxc-conf"}, "Add custom lxc options --lxc-conf=\"lxc.cgroup.cpuset.cpus = 0,1\"")
78 78
 
79 79
 	if err := cmd.Parse(args); err != nil {
80 80
 		return nil, nil, cmd, err