mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Auto-update documentation from the output of the cli.
I've re-jigged the run man page so that each option's text begins with the cli's help text for that flag, and then ay subsequent lines in the man page are carried forward. Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
This commit is contained in:
parent
6e7a210db6
commit
e01baa6be7
19 changed files with 190 additions and 115 deletions
|
@ -104,6 +104,11 @@ def update_man_pages():
|
||||||
re.MULTILINE | re.DOTALL
|
re.MULTILINE | re.DOTALL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
options_re = re.compile(
|
||||||
|
r".*# OPTIONS(.*?)# (HISTORY|EXAMPLES?).*",
|
||||||
|
re.MULTILINE | re.DOTALL
|
||||||
|
)
|
||||||
|
|
||||||
example_re = re.compile(
|
example_re = re.compile(
|
||||||
r".*# EXAMPLES?(.*)# HISTORY.*",
|
r".*# EXAMPLES?(.*)# HISTORY.*",
|
||||||
re.MULTILINE | re.DOTALL
|
re.MULTILINE | re.DOTALL
|
||||||
|
@ -116,8 +121,12 @@ def update_man_pages():
|
||||||
|
|
||||||
for command in cmds:
|
for command in cmds:
|
||||||
print "COMMAND: "+command
|
print "COMMAND: "+command
|
||||||
|
if command == "":
|
||||||
|
print "SKIPPING"
|
||||||
|
continue
|
||||||
history = ""
|
history = ""
|
||||||
description = ""
|
description = ""
|
||||||
|
original_options = ""
|
||||||
examples = ""
|
examples = ""
|
||||||
if os.path.isfile("docs/man/docker-"+command+".1.md"):
|
if os.path.isfile("docs/man/docker-"+command+".1.md"):
|
||||||
intext = open("docs/man/docker-"+command+".1.md", "r")
|
intext = open("docs/man/docker-"+command+".1.md", "r")
|
||||||
|
@ -126,6 +135,10 @@ def update_man_pages():
|
||||||
match = desc_re.match(txt)
|
match = desc_re.match(txt)
|
||||||
if match:
|
if match:
|
||||||
description = match.group(1)
|
description = match.group(1)
|
||||||
|
match = options_re.match(txt)
|
||||||
|
if match:
|
||||||
|
original_options = match.group(1)
|
||||||
|
#print "MATCHED OPTIONS\n" + original_options
|
||||||
match = example_re.match(txt)
|
match = example_re.match(txt)
|
||||||
if match:
|
if match:
|
||||||
examples = match.group(1)
|
examples = match.group(1)
|
||||||
|
@ -170,7 +183,7 @@ def update_man_pages():
|
||||||
|
|
||||||
# replace [OPTIONS] with the list of params
|
# replace [OPTIONS] with the list of params
|
||||||
options = ""
|
options = ""
|
||||||
match = re.match("\[OPTIONS\](.*)", usage)
|
match = re.match("\[OPTIONS\]\s*(.*)", usage)
|
||||||
if match:
|
if match:
|
||||||
usage = match.group(1)
|
usage = match.group(1)
|
||||||
|
|
||||||
|
@ -178,11 +191,13 @@ def update_man_pages():
|
||||||
# TODO: sort without the `-`'s
|
# TODO: sort without the `-`'s
|
||||||
for key in sorted(params.keys(), key=lambda s: s.lower()):
|
for key in sorted(params.keys(), key=lambda s: s.lower()):
|
||||||
# split on commas, remove --?.*=.*, put in *'s mumble
|
# split on commas, remove --?.*=.*, put in *'s mumble
|
||||||
|
flags = []
|
||||||
ps = []
|
ps = []
|
||||||
opts = []
|
opts = []
|
||||||
for k in key_params[key].split(","):
|
for k in key_params[key].split(","):
|
||||||
match = re.match("(-+)([A-Za-z-0-9]*)(?:=(.*))?", k.lstrip())
|
match = re.match("(-+)([A-Za-z-0-9]*)(?:=(.*))?", k.lstrip())
|
||||||
if match:
|
if match:
|
||||||
|
flags.append("{}{}".format(match.group(1), match.group(2)))
|
||||||
p = "**{}{}**".format(match.group(1), match.group(2))
|
p = "**{}{}**".format(match.group(1), match.group(2))
|
||||||
o = "**{}{}**".format(match.group(1), match.group(2))
|
o = "**{}{}**".format(match.group(1), match.group(2))
|
||||||
if match.group(3):
|
if match.group(3):
|
||||||
|
@ -203,7 +218,25 @@ def update_man_pages():
|
||||||
else:
|
else:
|
||||||
print "nomatch:{}".format(k)
|
print "nomatch:{}".format(k)
|
||||||
new_usage = "{}\n[{}]".format(new_usage, "|".join(ps))
|
new_usage = "{}\n[{}]".format(new_usage, "|".join(ps))
|
||||||
|
|
||||||
options = "{}{}\n {}\n\n".format(options, ", ".join(opts), params[key])
|
options = "{}{}\n {}\n\n".format(options, ", ".join(opts), params[key])
|
||||||
|
|
||||||
|
# look at the original options documentation and if its hand written, add it too.
|
||||||
|
print "SVEN_re: "+flags[0]
|
||||||
|
singleoption_re = re.compile(
|
||||||
|
r".*[\r\n]\*\*"+flags[0]+"\*\*([^\r\n]*)[\r\n]+(.*?)[\r\n](\*\*-|# [A-Z]|\*\*[A-Z]+\*\*).*",
|
||||||
|
#r""+flags[0]+"(.*)(^\*\*-.*)?",
|
||||||
|
re.MULTILINE | re.DOTALL
|
||||||
|
)
|
||||||
|
match = singleoption_re.match(original_options)
|
||||||
|
if match:
|
||||||
|
info = match.group(2).strip()
|
||||||
|
print "MATCHED: " + match.group(1).strip()
|
||||||
|
if info != params[key].strip():
|
||||||
|
#info = re.sub(params[key].strip(), '', info, flags=re.MULTILINE)
|
||||||
|
print "INFO changed: " +info
|
||||||
|
options = "{} {}\n\n".format(options, info.strip())
|
||||||
|
|
||||||
if new_usage != "":
|
if new_usage != "":
|
||||||
new_usage = "{}\n".format(new_usage.strip())
|
new_usage = "{}\n".format(new_usage.strip())
|
||||||
usage = new_usage + usage
|
usage = new_usage + usage
|
||||||
|
@ -230,8 +263,8 @@ def update_man_pages():
|
||||||
".*{}.*".format(date_string),
|
".*{}.*".format(date_string),
|
||||||
re.MULTILINE | re.DOTALL
|
re.MULTILINE | re.DOTALL
|
||||||
)
|
)
|
||||||
if not recent_history_re.match(history):
|
# if not recent_history_re.match(history):
|
||||||
outtext.write("{}, updated by Sven Dowideit <SvenDowideit@home.org.au>\n".format(date_string))
|
# outtext.write("{}, updated by Sven Dowideit <SvenDowideit@home.org.au>\n".format(date_string))
|
||||||
outtext.close()
|
outtext.close()
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
|
|
@ -8,7 +8,7 @@ docker-attach - Attach to a running container
|
||||||
**docker attach**
|
**docker attach**
|
||||||
[**--no-stdin**[=*false*]]
|
[**--no-stdin**[=*false*]]
|
||||||
[**--sig-proxy**[=*true*]]
|
[**--sig-proxy**[=*true*]]
|
||||||
CONTAINER
|
CONTAINER
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
If you **docker run** a container in detached mode (**-d**), you can reattach to
|
If you **docker run** a container in detached mode (**-d**), you can reattach to
|
||||||
|
|
|
@ -11,7 +11,7 @@ docker-build - Build a new image from the source code at PATH
|
||||||
[**-q**|**--quiet**[=*false*]]
|
[**-q**|**--quiet**[=*false*]]
|
||||||
[**--rm**[=*true*]]
|
[**--rm**[=*true*]]
|
||||||
[**-t**|**--tag**[=*TAG*]]
|
[**-t**|**--tag**[=*TAG*]]
|
||||||
PATH | URL | -
|
PATH | URL | -
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
This will read the Dockerfile from the directory specified in **PATH**.
|
This will read the Dockerfile from the directory specified in **PATH**.
|
||||||
|
|
|
@ -9,7 +9,7 @@ docker-commit - Create a new image from a container's changes
|
||||||
[**-a**|**--author**[=*AUTHOR*]]
|
[**-a**|**--author**[=*AUTHOR*]]
|
||||||
[**-m**|**--message**[=*MESSAGE*]]
|
[**-m**|**--message**[=*MESSAGE*]]
|
||||||
[**-p**|**--pause**[=*true*]]
|
[**-p**|**--pause**[=*true*]]
|
||||||
CONTAINER [REPOSITORY[:TAG]]
|
CONTAINER [REPOSITORY[:TAG]]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
Using an existing container's name or ID you can create a new image.
|
Using an existing container's name or ID you can create a new image.
|
||||||
|
|
|
@ -22,21 +22,24 @@ docker-create - Create a new container
|
||||||
[**--expose**[=*[]*]]
|
[**--expose**[=*[]*]]
|
||||||
[**-h**|**--hostname**[=*HOSTNAME*]]
|
[**-h**|**--hostname**[=*HOSTNAME*]]
|
||||||
[**-i**|**--interactive**[=*false*]]
|
[**-i**|**--interactive**[=*false*]]
|
||||||
|
[**--ipc**[=*IPC*]]
|
||||||
[**--link**[=*[]*]]
|
[**--link**[=*[]*]]
|
||||||
[**--lxc-conf**[=*[]*]]
|
[**--lxc-conf**[=*[]*]]
|
||||||
[**-m**|**--memory**[=*MEMORY*]]
|
[**-m**|**--memory**[=*MEMORY*]]
|
||||||
|
[**--mac-address**[=*MAC-ADDRESS*]]
|
||||||
[**--name**[=*NAME*]]
|
[**--name**[=*NAME*]]
|
||||||
[**--net**[=*"bridge"*]]
|
[**--net**[=*"bridge"*]]
|
||||||
[**-P**|**--publish-all**[=*false*]]
|
[**-P**|**--publish-all**[=*false*]]
|
||||||
[**-p**|**--publish**[=*[]*]]
|
[**-p**|**--publish**[=*[]*]]
|
||||||
[**--privileged**[=*false*]]
|
[**--privileged**[=*false*]]
|
||||||
[**--restart**[=*RESTART*]]
|
[**--restart**[=*RESTART*]]
|
||||||
|
[**--security-opt**[=*[]*]]
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
[**-u**|**--user**[=*USER*]]
|
[**-u**|**--user**[=*USER*]]
|
||||||
[**-v**|**--volume**[=*[]*]]
|
[**-v**|**--volume**[=*[]*]]
|
||||||
[**--volumes-from**[=*[]*]]
|
[**--volumes-from**[=*[]*]]
|
||||||
[**-w**|**--workdir**[=*WORKDIR*]]
|
[**-w**|**--workdir**[=*WORKDIR*]]
|
||||||
IMAGE [COMMAND] [ARG...]
|
IMAGE [COMMAND] [ARG...]
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
**-a**, **--attach**=[]
|
**-a**, **--attach**=[]
|
||||||
|
@ -87,6 +90,11 @@ docker-create - Create a new container
|
||||||
**-i**, **--interactive**=*true*|*false*
|
**-i**, **--interactive**=*true*|*false*
|
||||||
Keep STDIN open even if not attached. The default is *false*.
|
Keep STDIN open even if not attached. The default is *false*.
|
||||||
|
|
||||||
|
**--ipc**=""
|
||||||
|
Default is to create a private IPC namespace (POSIX SysV IPC) for the container
|
||||||
|
'container:<name|id>': reuses another container shared memory, semaphores and message queues
|
||||||
|
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
|
||||||
|
|
||||||
**--link**=[]
|
**--link**=[]
|
||||||
Add link to another container in the form of name:alias
|
Add link to another container in the form of name:alias
|
||||||
|
|
||||||
|
@ -96,6 +104,9 @@ docker-create - Create a new container
|
||||||
**-m**, **--memory**=""
|
**-m**, **--memory**=""
|
||||||
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
|
|
||||||
|
**--mac-address**=""
|
||||||
|
Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
|
|
||||||
**--name**=""
|
**--name**=""
|
||||||
Assign a name to the container
|
Assign a name to the container
|
||||||
|
|
||||||
|
@ -120,6 +131,9 @@ docker-create - Create a new container
|
||||||
**--restart**=""
|
**--restart**=""
|
||||||
Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
|
|
||||||
|
**--security-opt**=[]
|
||||||
|
Security Options
|
||||||
|
|
||||||
**-t**, **--tty**=*true*|*false*
|
**-t**, **--tty**=*true*|*false*
|
||||||
Allocate a pseudo-TTY. The default is *false*.
|
Allocate a pseudo-TTY. The default is *false*.
|
||||||
|
|
||||||
|
@ -138,3 +152,4 @@ docker-create - Create a new container
|
||||||
# HISTORY
|
# HISTORY
|
||||||
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
September 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
September 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
% DOCKER(1) Docker User Manuals
|
% DOCKER(1) Docker User Manuals
|
||||||
% Docker Community
|
% Docker Community
|
||||||
% SEPT 2014
|
% JUNE 2014
|
||||||
# NAME
|
# NAME
|
||||||
docker-exec - Run a command in a running container
|
docker-exec - Run a command in a running container
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ docker-exec - Run a command in a running container
|
||||||
[**-d**|**--detach**[=*false*]]
|
[**-d**|**--detach**[=*false*]]
|
||||||
[**-i**|**--interactive**[=*false*]]
|
[**-i**|**--interactive**[=*false*]]
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
CONTAINER COMMAND [ARG...]
|
CONTAINER COMMAND [ARG...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
@ -19,17 +19,17 @@ The command started using `docker exec` will only run while the container's prim
|
||||||
process (`PID 1`) is running, and will not be restarted if the container is restarted.
|
process (`PID 1`) is running, and will not be restarted if the container is restarted.
|
||||||
|
|
||||||
If the container is paused, then the `docker exec` command will wait until the
|
If the container is paused, then the `docker exec` command will wait until the
|
||||||
container is unpaused, and then run.
|
container is unpaused, and then run
|
||||||
|
|
||||||
# Options
|
|
||||||
|
|
||||||
|
# OPTIONS
|
||||||
**-d**, **--detach**=*true*|*false*
|
**-d**, **--detach**=*true*|*false*
|
||||||
Detached mode. This runs the new process in the background.
|
Detached mode: run command in the background. The default is *false*.
|
||||||
|
|
||||||
**-i**, **--interactive**=*true*|*false*
|
**-i**, **--interactive**=*true*|*false*
|
||||||
When set to true, keep STDIN open even if not attached. The default is false.
|
Keep STDIN open even if not attached. The default is *false*.
|
||||||
|
|
||||||
**-t**, **--tty**=*true*|*false*
|
**-t**, **--tty**=*true*|*false*
|
||||||
When set to true Docker can allocate a pseudo-tty and attach to the standard
|
Allocate a pseudo-TTY. The default is *false*.
|
||||||
input of the process. This can be used, for example, to run a throwaway
|
|
||||||
interactive shell. The default value is false.
|
# HISTORY
|
||||||
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -8,7 +8,7 @@ docker-history - Show the history of an image
|
||||||
**docker history**
|
**docker history**
|
||||||
[**--no-trunc**[=*false*]]
|
[**--no-trunc**[=*false*]]
|
||||||
[**-q**|**--quiet**[=*false*]]
|
[**-q**|**--quiet**[=*false*]]
|
||||||
IMAGE
|
IMAGE
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ docker-images - List images
|
||||||
[**-f**|**--filter**[=*[]*]]
|
[**-f**|**--filter**[=*[]*]]
|
||||||
[**--no-trunc**[=*false*]]
|
[**--no-trunc**[=*false*]]
|
||||||
[**-q**|**--quiet**[=*false*]]
|
[**-q**|**--quiet**[=*false*]]
|
||||||
[REPOSITORY]
|
[REPOSITORY]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
This command lists the images stored in the local Docker repository.
|
This command lists the images stored in the local Docker repository.
|
||||||
|
|
|
@ -7,7 +7,7 @@ docker-kill - Kill a running container using SIGKILL or a specified signal
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker kill**
|
**docker kill**
|
||||||
[**-s**|**--signal**[=*"KILL"*]]
|
[**-s**|**--signal**[=*"KILL"*]]
|
||||||
CONTAINER [CONTAINER...]
|
CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ docker-login - Register or log in to a Docker registry server, if no server is s
|
||||||
[**-e**|**--email**[=*EMAIL*]]
|
[**-e**|**--email**[=*EMAIL*]]
|
||||||
[**-p**|**--password**[=*PASSWORD*]]
|
[**-p**|**--password**[=*PASSWORD*]]
|
||||||
[**-u**|**--username**[=*USERNAME*]]
|
[**-u**|**--username**[=*USERNAME*]]
|
||||||
[SERVER]
|
[SERVER]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
Register or Login to a docker registry server, if no server is
|
Register or Login to a docker registry server, if no server is
|
||||||
|
|
|
@ -5,11 +5,15 @@
|
||||||
docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker port** CONTAINER [PRIVATE_PORT[/PROTO]]
|
**docker port**
|
||||||
|
CONTAINER [PRIVATE_PORT[/PROTO]]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
||||||
|
|
||||||
|
# OPTIONS
|
||||||
|
There are no available options.
|
||||||
|
|
||||||
# EXAMPLES
|
# EXAMPLES
|
||||||
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
||||||
ask for just a specific mapping:
|
ask for just a specific mapping:
|
||||||
|
@ -30,3 +34,4 @@ ask for just a specific mapping:
|
||||||
# HISTORY
|
# HISTORY
|
||||||
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
||||||
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -32,6 +32,7 @@ the running containers.
|
||||||
**-f**, **--filter**=[]
|
**-f**, **--filter**=[]
|
||||||
Provide filter values. Valid filters:
|
Provide filter values. Valid filters:
|
||||||
exited=<int> - containers with exit code of <int>
|
exited=<int> - containers with exit code of <int>
|
||||||
|
status=(restarting|running|paused|exited)
|
||||||
|
|
||||||
**-l**, **--latest**=*true*|*false*
|
**-l**, **--latest**=*true*|*false*
|
||||||
Show only the latest created container, include non-running ones. The default is *false*.
|
Show only the latest created container, include non-running ones. The default is *false*.
|
||||||
|
@ -74,3 +75,4 @@ April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
||||||
based on docker.com source material and internal work.
|
based on docker.com source material and internal work.
|
||||||
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -7,7 +7,7 @@ docker-restart - Restart a running container
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker restart**
|
**docker restart**
|
||||||
[**-t**|**--time**[=*10*]]
|
[**-t**|**--time**[=*10*]]
|
||||||
CONTAINER [CONTAINER...]
|
CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
Restart each container listed.
|
Restart each container listed.
|
||||||
|
|
|
@ -9,7 +9,7 @@ docker-rm - Remove one or more containers
|
||||||
[**-f**|**--force**[=*false*]]
|
[**-f**|**--force**[=*false*]]
|
||||||
[**-l**|**--link**[=*false*]]
|
[**-l**|**--link**[=*false*]]
|
||||||
[**-v**|**--volumes**[=*false*]]
|
[**-v**|**--volumes**[=*false*]]
|
||||||
CONTAINER [CONTAINER...]
|
CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
|
|
@ -23,26 +23,26 @@ docker-run - Run a command in a new container
|
||||||
[**--expose**[=*[]*]]
|
[**--expose**[=*[]*]]
|
||||||
[**-h**|**--hostname**[=*HOSTNAME*]]
|
[**-h**|**--hostname**[=*HOSTNAME*]]
|
||||||
[**-i**|**--interactive**[=*false*]]
|
[**-i**|**--interactive**[=*false*]]
|
||||||
[**--ipc**[=*[]*]]
|
[**--ipc**[=*IPC*]]
|
||||||
[**--security-opt**[=*[]*]]
|
|
||||||
[**--link**[=*[]*]]
|
[**--link**[=*[]*]]
|
||||||
[**--lxc-conf**[=*[]*]]
|
[**--lxc-conf**[=*[]*]]
|
||||||
[**-m**|**--memory**[=*MEMORY*]]
|
[**-m**|**--memory**[=*MEMORY*]]
|
||||||
|
[**--mac-address**[=*MAC-ADDRESS*]]
|
||||||
[**--name**[=*NAME*]]
|
[**--name**[=*NAME*]]
|
||||||
[**--net**[=*"bridge"*]]
|
[**--net**[=*"bridge"*]]
|
||||||
[**--mac-address**[=*MACADDRESS*]]
|
|
||||||
[**-P**|**--publish-all**[=*false*]]
|
[**-P**|**--publish-all**[=*false*]]
|
||||||
[**-p**|**--publish**[=*[]*]]
|
[**-p**|**--publish**[=*[]*]]
|
||||||
[**--privileged**[=*false*]]
|
[**--privileged**[=*false*]]
|
||||||
[**--restart**[=*POLICY*]]
|
[**--restart**[=*RESTART*]]
|
||||||
[**--rm**[=*false*]]
|
[**--rm**[=*false*]]
|
||||||
|
[**--security-opt**[=*[]*]]
|
||||||
[**--sig-proxy**[=*true*]]
|
[**--sig-proxy**[=*true*]]
|
||||||
[**-t**|**--tty**[=*false*]]
|
[**-t**|**--tty**[=*false*]]
|
||||||
[**-u**|**--user**[=*USER*]]
|
[**-u**|**--user**[=*USER*]]
|
||||||
[**-v**|**--volume**[=*[]*]]
|
[**-v**|**--volume**[=*[]*]]
|
||||||
[**--volumes-from**[=*[]*]]
|
[**--volumes-from**[=*[]*]]
|
||||||
[**-w**|**--workdir**[=*WORKDIR*]]
|
[**-w**|**--workdir**[=*WORKDIR*]]
|
||||||
IMAGE [COMMAND] [ARG...]
|
IMAGE [COMMAND] [ARG...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
|
@ -59,21 +59,26 @@ all image dependencies, from the repository in the same way running **docker
|
||||||
pull** IMAGE, before it starts the container from that image.
|
pull** IMAGE, before it starts the container from that image.
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
**-a**, **--attach**=[]
|
||||||
|
Attach to STDIN, STDOUT or STDERR.
|
||||||
|
|
||||||
**-a**, **--attach**=*stdin*|*stdout*|*stderr*
|
In foreground mode (the default when **-d**
|
||||||
Attach to stdin, stdout or stderr. In foreground mode (the default when
|
is not specified), **docker run** can start the process in the container
|
||||||
**-d** is not specified), **docker run** can start the process in the container
|
|
||||||
and attach the console to the process’s standard input, output, and standard
|
and attach the console to the process’s standard input, output, and standard
|
||||||
error. It can even pretend to be a TTY (this is what most commandline
|
error. It can even pretend to be a TTY (this is what most commandline
|
||||||
executables expect) and pass along signals. The **-a** option can be set for
|
executables expect) and pass along signals. The **-a** option can be set for
|
||||||
each of stdin, stdout, and stderr.
|
each of stdin, stdout, and stderr.
|
||||||
|
|
||||||
**--add-host**=*hostname*:*ip*
|
**--add-host**=[]
|
||||||
|
Add a custom host-to-IP mapping (host:ip)
|
||||||
|
|
||||||
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
Add a line to /etc/hosts. The format is hostname:ip. The **--add-host**
|
||||||
option can be set multiple times.
|
option can be set multiple times.
|
||||||
|
|
||||||
**-c**, **--cpu-shares**=0
|
**-c**, **--cpu-shares**=0
|
||||||
CPU shares in relative weight. You can increase the priority of a container
|
CPU shares (relative weight)
|
||||||
|
|
||||||
|
You can increase the priority of a container
|
||||||
with the -c option. By default, all containers run at the same priority and get
|
with the -c option. By default, all containers run at the same priority and get
|
||||||
the same proportion of CPU cycles, but you can tell the kernel to give more
|
the same proportion of CPU cycles, but you can tell the kernel to give more
|
||||||
shares of CPU time to one or more containers when you start them via **docker
|
shares of CPU time to one or more containers when you start them via **docker
|
||||||
|
@ -92,8 +97,9 @@ run**.
|
||||||
CPUs in which to allow execution (0-3, 0,1)
|
CPUs in which to allow execution (0-3, 0,1)
|
||||||
|
|
||||||
**-d**, **--detach**=*true*|*false*
|
**-d**, **--detach**=*true*|*false*
|
||||||
Detached mode. This runs the container in the background. It outputs the new
|
Detached mode: run the container in the background and print the new container ID. The default is *false*.
|
||||||
container's ID and any error messages. At any time you can run **docker ps** in
|
|
||||||
|
At any time you can run **docker ps** in
|
||||||
the other shell to view a list of the running containers. You can reattach to a
|
the other shell to view a list of the running containers. You can reattach to a
|
||||||
detached container with **docker attach**. If you choose to run a container in
|
detached container with **docker attach**. If you choose to run a container in
|
||||||
the detached mode, then you cannot use the **-rm** option.
|
the detached mode, then you cannot use the **-rm** option.
|
||||||
|
@ -107,19 +113,24 @@ stopping the process by pressing the keys CTRL-P CTRL-Q.
|
||||||
**--dns-search**=[]
|
**--dns-search**=[]
|
||||||
Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
|
Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
|
||||||
|
|
||||||
**--dns**=*IP-address*
|
**--dns**=[]
|
||||||
Set custom DNS servers. This option can be used to override the DNS
|
Set custom DNS servers
|
||||||
|
|
||||||
|
This option can be used to override the DNS
|
||||||
configuration passed to the container. Typically this is necessary when the
|
configuration passed to the container. Typically this is necessary when the
|
||||||
host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
|
host DNS configuration is invalid for the container (e.g., 127.0.0.1). When this
|
||||||
is the case the **--dns** flags is necessary for every run.
|
is the case the **--dns** flags is necessary for every run.
|
||||||
|
|
||||||
**-e**, **--env**=*environment*
|
**-e**, **--env**=[]
|
||||||
Set environment variables. This option allows you to specify arbitrary
|
Set environment variables
|
||||||
|
|
||||||
|
This option allows you to specify arbitrary
|
||||||
environment variables that are available for the process that will be launched
|
environment variables that are available for the process that will be launched
|
||||||
inside of the container.
|
inside of the container.
|
||||||
|
|
||||||
|
**--entrypoint**=""
|
||||||
|
Overwrite the default ENTRYPOINT of the image
|
||||||
|
|
||||||
**--entrypoint**=*command*
|
|
||||||
This option allows you to overwrite the default entrypoint of the image that
|
This option allows you to overwrite the default entrypoint of the image that
|
||||||
is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND
|
is set in the Dockerfile. The ENTRYPOINT of an image is similar to a COMMAND
|
||||||
because it specifies what executable to run when the container starts, but it is
|
because it specifies what executable to run when the container starts, but it is
|
||||||
|
@ -137,27 +148,25 @@ ENTRYPOINT.
|
||||||
**--expose**=[]
|
**--expose**=[]
|
||||||
Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
||||||
|
|
||||||
**-h**, **--hostname**=*hostname*
|
**-h**, **--hostname**=""
|
||||||
|
Container host name
|
||||||
|
|
||||||
Sets the container host name that is available inside the container.
|
Sets the container host name that is available inside the container.
|
||||||
|
|
||||||
**-i**, **--interactive**=*true*|*false*
|
**-i**, **--interactive**=*true*|*false*
|
||||||
|
Keep STDIN open even if not attached. The default is *false*.
|
||||||
|
|
||||||
When set to true, keep stdin open even if not attached. The default is false.
|
When set to true, keep stdin open even if not attached. The default is false.
|
||||||
|
|
||||||
**--ipc**=[]
|
**--ipc**=""
|
||||||
Set the IPC mode for the container
|
Default is to create a private IPC namespace (POSIX SysV IPC) for the container
|
||||||
**container**:<*name*|*id*>: reuses another container's IPC stack
|
'container:<name|id>': reuses another container shared memory, semaphores and message queues
|
||||||
**host**: use the host's IPC stack inside the container.
|
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
|
||||||
Note: the host mode gives the container full access to local IPC and is therefore considered insecure.
|
|
||||||
|
|
||||||
**--security-opt**=*secdriver*:*name*:*value*
|
**--link**=[]
|
||||||
"label:user:USER" : Set the label user for the container
|
Add link to another container in the form of name:alias
|
||||||
"label:role:ROLE" : Set the label role for the container
|
|
||||||
"label:type:TYPE" : Set the label type for the container
|
|
||||||
"label:level:LEVEL" : Set the label level for the container
|
|
||||||
"label:disable" : Turn off label confinement for the container
|
|
||||||
|
|
||||||
**--link**=*name*:*alias*
|
If the operator
|
||||||
Add link to another container. The format is name:alias. If the operator
|
|
||||||
uses **--link** when starting the new client container, then the client
|
uses **--link** when starting the new client container, then the client
|
||||||
container can access the exposed port via a private networking interface. Docker
|
container can access the exposed port via a private networking interface. Docker
|
||||||
will set some environment variables in the client container to help indicate
|
will set some environment variables in the client container to help indicate
|
||||||
|
@ -166,7 +175,9 @@ which interface and port to use.
|
||||||
**--lxc-conf**=[]
|
**--lxc-conf**=[]
|
||||||
(lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
(lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
||||||
|
|
||||||
**-m**, **--memory**=*memory-limit*
|
**-m**, **--memory**=""
|
||||||
|
Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
|
|
||||||
Allows you to constrain the memory available to a container. If the host
|
Allows you to constrain the memory available to a container. If the host
|
||||||
supports swap memory, then the -m memory setting can be larger than physical
|
supports swap memory, then the -m memory setting can be larger than physical
|
||||||
RAM. If a limit of 0 is specified, the container's memory is not limited. The
|
RAM. If a limit of 0 is specified, the container's memory is not limited. The
|
||||||
|
@ -174,15 +185,23 @@ actual limit may be rounded up to a multiple of the operating system's page
|
||||||
size, if it is not already. The memory limit should be formatted as follows:
|
size, if it is not already. The memory limit should be formatted as follows:
|
||||||
`<number><optional unit>`, where unit = b, k, m or g.
|
`<number><optional unit>`, where unit = b, k, m or g.
|
||||||
|
|
||||||
**--name**=*name*
|
**--mac-address**=""
|
||||||
Assign a name to the container. The operator can identify a container in
|
Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
three ways:
|
|
||||||
|
Remember that the MAC address in an Ethernet network must be unique.
|
||||||
|
The IPv6 link-local address will be based on the device's MAC address
|
||||||
|
according to RFC4862.
|
||||||
|
|
||||||
|
**--name**=""
|
||||||
|
Assign a name to the container
|
||||||
|
|
||||||
|
The operator can identify a container in three ways:
|
||||||
|
|
||||||
UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”)
|
UUID long identifier (“f78375b1c487e03c9438c729345e54db9d20cfa2ac1fc3494b6eb60872e74778”)
|
||||||
UUID short identifier (“f78375b1c487”)
|
UUID short identifier (“f78375b1c487”)
|
||||||
Name (“jonah”)
|
Name (“jonah”)
|
||||||
|
|
||||||
The UUID identifiers come from the Docker daemon, and if a name is not assigned
|
The UUID identifiers come from the Docker daemon, and if a name is not assigned
|
||||||
to the container with **--name** then the daemon will also generate a random
|
to the container with **--name** then the daemon will also generate a random
|
||||||
string name. The name is useful when defining links (see **--link**) (or any
|
string name. The name is useful when defining links (see **--link**) (or any
|
||||||
other place you need to identify a container). This works for both background
|
other place you need to identify a container). This works for both background
|
||||||
|
@ -190,21 +209,14 @@ and foreground Docker containers.
|
||||||
|
|
||||||
**--net**="bridge"
|
**--net**="bridge"
|
||||||
Set the Network mode for the container
|
Set the Network mode for the container
|
||||||
**bridge**: creates a new network stack for the container on the docker bridge
|
'bridge': creates a new network stack for the container on the docker bridge
|
||||||
**none**: no networking for this container
|
'none': no networking for this container
|
||||||
**container**:<*name*|*id*>: reuses another container's network stack
|
'container:<name|id>': reuses another container network stack
|
||||||
**host**: use the host network stack inside the container.
|
'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
|
||||||
Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
|
|
||||||
|
|
||||||
**--mac-address**=*macaddress*
|
|
||||||
Set the MAC address for the container's Ethernet device:
|
|
||||||
--mac-address=12:34:56:78:9a:bc
|
|
||||||
|
|
||||||
Remember that the MAC address in an Ethernet network must be unique.
|
|
||||||
The IPv6 link-local address will be based on the device's MAC address
|
|
||||||
according to RFC4862.
|
|
||||||
|
|
||||||
**-P**, **--publish-all**=*true*|*false*
|
**-P**, **--publish-all**=*true*|*false*
|
||||||
|
Publish all exposed ports to the host interfaces. The default is *false*.
|
||||||
|
|
||||||
When set to true publish all exposed ports to the host interfaces. The
|
When set to true publish all exposed ports to the host interfaces. The
|
||||||
default is false. If the operator uses -P (or -p) then Docker will make the
|
default is false. If the operator uses -P (or -p) then Docker will make the
|
||||||
exposed port accessible on the host and the ports will be available to any
|
exposed port accessible on the host and the ports will be available to any
|
||||||
|
@ -213,29 +225,44 @@ ports to a random port on the host between 49153 and 65535. To find the
|
||||||
mapping between the host ports and the exposed ports, use **docker port**.
|
mapping between the host ports and the exposed ports, use **docker port**.
|
||||||
|
|
||||||
**-p**, **--publish**=[]
|
**-p**, **--publish**=[]
|
||||||
Publish a container's port to the host (format: ip:hostPort:containerPort |
|
Publish a container's port to the host
|
||||||
ip::containerPort | hostPort:containerPort | containerPort) (use **docker port** to see the
|
format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
|
||||||
actual mapping)
|
(use 'docker port' to see the actual mapping)
|
||||||
|
|
||||||
**--privileged**=*true*|*false*
|
**--privileged**=*true*|*false*
|
||||||
Give extended privileges to this container. By default, Docker containers are
|
Give extended privileges to this container. The default is *false*.
|
||||||
|
|
||||||
|
By default, Docker containers are
|
||||||
“unprivileged” (=false) and cannot, for example, run a Docker daemon inside the
|
“unprivileged” (=false) and cannot, for example, run a Docker daemon inside the
|
||||||
Docker container. This is because by default a container is not allowed to
|
Docker container. This is because by default a container is not allowed to
|
||||||
access any devices. A “privileged” container is given access to all devices.
|
access any devices. A “privileged” container is given access to all devices.
|
||||||
|
|
||||||
When the operator executes **docker run --privileged**, Docker will enable access
|
When the operator executes **docker run --privileged**, Docker will enable access
|
||||||
to all devices on the host as well as set some configuration in AppArmor to
|
to all devices on the host as well as set some configuration in AppArmor to
|
||||||
allow the container nearly all the same access to the host as processes running
|
allow the container nearly all the same access to the host as processes running
|
||||||
outside of a container on the host.
|
outside of a container on the host.
|
||||||
|
|
||||||
|
**--restart**=""
|
||||||
|
Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
|
|
||||||
**--rm**=*true*|*false*
|
**--rm**=*true*|*false*
|
||||||
Automatically remove the container when it exits (incompatible with -d). The default is *false*.
|
Automatically remove the container when it exits (incompatible with -d). The default is *false*.
|
||||||
|
|
||||||
|
**--security-opt**=[]
|
||||||
|
Security Options
|
||||||
|
|
||||||
|
"label:user:USER" : Set the label user for the container
|
||||||
|
"label:role:ROLE" : Set the label role for the container
|
||||||
|
"label:type:TYPE" : Set the label type for the container
|
||||||
|
"label:level:LEVEL" : Set the label level for the container
|
||||||
|
"label:disable" : Turn off label confinement for the container
|
||||||
|
|
||||||
**--sig-proxy**=*true*|*false*
|
**--sig-proxy**=*true*|*false*
|
||||||
Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*.
|
Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied. The default is *true*.
|
||||||
|
|
||||||
**-t**, **--tty**=*true*|*false*
|
**-t**, **--tty**=*true*|*false*
|
||||||
|
Allocate a pseudo-TTY. The default is *false*.
|
||||||
|
|
||||||
When set to true Docker can allocate a pseudo-tty and attach to the standard
|
When set to true Docker can allocate a pseudo-tty and attach to the standard
|
||||||
input of any container. This can be used, for example, to run a throwaway
|
input of any container. This can be used, for example, to run a throwaway
|
||||||
interactive shell. The default is value is false.
|
interactive shell. The default is value is false.
|
||||||
|
@ -243,52 +270,39 @@ interactive shell. The default is value is false.
|
||||||
**-u**, **--user**=""
|
**-u**, **--user**=""
|
||||||
Username or UID
|
Username or UID
|
||||||
|
|
||||||
|
**-v**, **--volume**=[]
|
||||||
|
Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
||||||
|
|
||||||
**-v**, **--volume**=*volume*[:ro|:rw]
|
The **-v** option can be used one or
|
||||||
Bind mount a volume to the container.
|
|
||||||
|
|
||||||
The **-v** option can be used one or
|
|
||||||
more times to add one or more mounts to a container. These mounts can then be
|
more times to add one or more mounts to a container. These mounts can then be
|
||||||
used in other containers using the **--volumes-from** option.
|
used in other containers using the **--volumes-from** option.
|
||||||
|
|
||||||
The volume may be optionally suffixed with :ro or :rw to mount the volumes in
|
The volume may be optionally suffixed with :ro or :rw to mount the volumes in
|
||||||
read-only or read-write mode, respectively. By default, the volumes are mounted
|
read-only or read-write mode, respectively. By default, the volumes are mounted
|
||||||
read-write. See examples.
|
read-write. See examples.
|
||||||
|
|
||||||
**--volumes-from**=*container-id*[:ro|:rw]
|
**--volumes-from**=[]
|
||||||
|
Mount volumes from the specified container(s)
|
||||||
|
|
||||||
Will mount volumes from the specified container identified by container-id.
|
Will mount volumes from the specified container identified by container-id.
|
||||||
Once a volume is mounted in a one container it can be shared with other
|
Once a volume is mounted in a one container it can be shared with other
|
||||||
containers using the **--volumes-from** option when running those other
|
containers using the **--volumes-from** option when running those other
|
||||||
containers. The volumes can be shared even if the original container with the
|
containers. The volumes can be shared even if the original container with the
|
||||||
mount is not running.
|
mount is not running.
|
||||||
|
|
||||||
The container ID may be optionally suffixed with :ro or
|
The container ID may be optionally suffixed with :ro or
|
||||||
:rw to mount the volumes in read-only or read-write mode, respectively. By
|
:rw to mount the volumes in read-only or read-write mode, respectively. By
|
||||||
default, the volumes are mounted in the same mode (read write or read only) as
|
default, the volumes are mounted in the same mode (read write or read only) as
|
||||||
the reference container.
|
the reference container.
|
||||||
|
|
||||||
|
**-w**, **--workdir**=""
|
||||||
|
Working directory inside the container
|
||||||
|
|
||||||
**-w**, **--workdir**=*directory*
|
The default working directory for
|
||||||
Working directory inside the container. The default working directory for
|
|
||||||
running binaries within a container is the root directory (/). The developer can
|
running binaries within a container is the root directory (/). The developer can
|
||||||
set a different default with the Dockerfile WORKDIR instruction. The operator
|
set a different default with the Dockerfile WORKDIR instruction. The operator
|
||||||
can override the working directory by using the **-w** option.
|
can override the working directory by using the **-w** option.
|
||||||
|
|
||||||
|
|
||||||
**IMAGE**
|
|
||||||
The image name or ID. You can specify a version of an image you'd like to run
|
|
||||||
the container with by adding image:tag to the command. For example,
|
|
||||||
`docker run ubuntu:14.04`.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**COMMAND**
|
|
||||||
The command or program to run inside the image.
|
|
||||||
|
|
||||||
|
|
||||||
**ARG**
|
|
||||||
The arguments for the command to be run in the container.
|
|
||||||
|
|
||||||
# EXAMPLES
|
# EXAMPLES
|
||||||
|
|
||||||
## Exposing log messages from the container to the host's log
|
## Exposing log messages from the container to the host's log
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
% Docker Community
|
% Docker Community
|
||||||
% JUNE 2014
|
% JUNE 2014
|
||||||
# NAME
|
# NAME
|
||||||
docker-save - Save an image to a tar archive (streamed to STDOUT by default)
|
docker-save - Save an image(s) to a tar archive (streamed to STDOUT by default)
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker save**
|
**docker save**
|
||||||
[**-o**|**--output**[=*OUTPUT*]]
|
[**-o**|**--output**[=*OUTPUT*]]
|
||||||
IMAGE
|
IMAGE [IMAGE...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
Produces a tarred repository to the standard output stream. Contains all
|
Produces a tarred repository to the standard output stream. Contains all
|
||||||
|
@ -35,3 +35,4 @@ fedora image to a fedora-latest.tar:
|
||||||
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
||||||
based on docker.com source material and internal work.
|
based on docker.com source material and internal work.
|
||||||
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
||||||
|
|
|
@ -7,7 +7,7 @@ docker-stop - Stop a running container by sending SIGTERM and then SIGKILL after
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker stop**
|
**docker stop**
|
||||||
[**-t**|**--time**[=*10*]]
|
[**-t**|**--time**[=*10*]]
|
||||||
CONTAINER [CONTAINER...]
|
CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
Stop a running container (Send SIGTERM, and then SIGKILL after
|
Stop a running container (Send SIGTERM, and then SIGKILL after
|
||||||
|
|
|
@ -7,7 +7,7 @@ docker-tag - Tag an image into a repository
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
**docker tag**
|
**docker tag**
|
||||||
[**-f**|**--force**[=*false*]]
|
[**-f**|**--force**[=*false*]]
|
||||||
IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
|
IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
|
||||||
|
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
This will give a new alias to an image in the repository. This refers to the
|
This will give a new alias to an image in the repository. This refers to the
|
||||||
|
|
|
@ -315,7 +315,6 @@ To kill the container, use `docker kill`.
|
||||||
|
|
||||||
--force-rm=false Always remove intermediate containers, even after unsuccessful builds
|
--force-rm=false Always remove intermediate containers, even after unsuccessful builds
|
||||||
--no-cache=false Do not use cache when building the image
|
--no-cache=false Do not use cache when building the image
|
||||||
--pull=false Always attempt to pull a newer version of the image
|
|
||||||
-q, --quiet=false Suppress the verbose output generated by the containers
|
-q, --quiet=false Suppress the verbose output generated by the containers
|
||||||
--rm=true Remove intermediate containers after a successful build
|
--rm=true Remove intermediate containers after a successful build
|
||||||
-t, --tag="" Repository name (and optionally a tag) to be applied to the resulting image in case of success
|
-t, --tag="" Repository name (and optionally a tag) to be applied to the resulting image in case of success
|
||||||
|
@ -538,11 +537,14 @@ Creates a new container.
|
||||||
--expose=[] Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
--expose=[] Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
||||||
-h, --hostname="" Container host name
|
-h, --hostname="" Container host name
|
||||||
-i, --interactive=false Keep STDIN open even if not attached
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
|
--ipc="" Default is to create a private IPC namespace (POSIX SysV IPC) for the container
|
||||||
|
'container:<name|id>': reuses another container shared memory, semaphores and message queues
|
||||||
|
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
|
||||||
--link=[] Add link to another container in the form of name:alias
|
--link=[] Add link to another container in the form of name:alias
|
||||||
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
||||||
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
|
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
--name="" Assign a name to the container
|
--name="" Assign a name to the container
|
||||||
--mac-address="" Set the container's MAC address
|
|
||||||
--net="bridge" Set the Network mode for the container
|
--net="bridge" Set the Network mode for the container
|
||||||
'bridge': creates a new network stack for the container on the docker bridge
|
'bridge': creates a new network stack for the container on the docker bridge
|
||||||
'none': no networking for this container
|
'none': no networking for this container
|
||||||
|
@ -554,6 +556,7 @@ Creates a new container.
|
||||||
(use 'docker port' to see the actual mapping)
|
(use 'docker port' to see the actual mapping)
|
||||||
--privileged=false Give extended privileges to this container
|
--privileged=false Give extended privileges to this container
|
||||||
--restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
--restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
|
--security-opt=[] Security Options
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
-u, --user="" Username or UID
|
-u, --user="" Username or UID
|
||||||
-v, --volume=[] Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
-v, --volume=[] Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
|
||||||
|
@ -614,10 +617,7 @@ For example:
|
||||||
Usage: docker events [OPTIONS]
|
Usage: docker events [OPTIONS]
|
||||||
|
|
||||||
Get real time events from the server
|
Get real time events from the server
|
||||||
-f, --filter=[] Provide filter values. Valid filters:
|
|
||||||
event=<string> - event to filter
|
|
||||||
image=<string> - image to filter
|
|
||||||
container=<string> - container to filter
|
|
||||||
--since="" Show all events created since timestamp
|
--since="" Show all events created since timestamp
|
||||||
--until="" Stream events until this timestamp
|
--until="" Stream events until this timestamp
|
||||||
|
|
||||||
|
@ -1321,9 +1321,13 @@ removed before the image is removed.
|
||||||
--expose=[] Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
--expose=[] Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
|
||||||
-h, --hostname="" Container host name
|
-h, --hostname="" Container host name
|
||||||
-i, --interactive=false Keep STDIN open even if not attached
|
-i, --interactive=false Keep STDIN open even if not attached
|
||||||
|
--ipc="" Default is to create a private IPC namespace (POSIX SysV IPC) for the container
|
||||||
|
'container:<name|id>': reuses another container shared memory, semaphores and message queues
|
||||||
|
'host': use the host shared memory,semaphores and message queues inside the container. Note: the host mode gives the container full access to local shared memory and is therefore considered insecure.
|
||||||
--link=[] Add link to another container in the form of name:alias
|
--link=[] Add link to another container in the form of name:alias
|
||||||
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
|
||||||
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
|
||||||
|
--mac-address="" Container MAC address (e.g. 92:d0:c6:0a:29:33)
|
||||||
--name="" Assign a name to the container
|
--name="" Assign a name to the container
|
||||||
--net="bridge" Set the Network mode for the container
|
--net="bridge" Set the Network mode for the container
|
||||||
'bridge': creates a new network stack for the container on the docker bridge
|
'bridge': creates a new network stack for the container on the docker bridge
|
||||||
|
@ -1337,6 +1341,7 @@ removed before the image is removed.
|
||||||
--privileged=false Give extended privileges to this container
|
--privileged=false Give extended privileges to this container
|
||||||
--restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
--restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
|
||||||
--rm=false Automatically remove the container when it exits (incompatible with -d)
|
--rm=false Automatically remove the container when it exits (incompatible with -d)
|
||||||
|
--security-opt=[] Security Options
|
||||||
--sig-proxy=true Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.
|
--sig-proxy=true Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not proxied.
|
||||||
-t, --tty=false Allocate a pseudo-TTY
|
-t, --tty=false Allocate a pseudo-TTY
|
||||||
-u, --user="" Username or UID
|
-u, --user="" Username or UID
|
||||||
|
@ -1682,8 +1687,8 @@ more details on finding shared images from the command line.
|
||||||
|
|
||||||
Restart a stopped container
|
Restart a stopped container
|
||||||
|
|
||||||
-a, --attach=false Attach container's `STDOUT` and `STDERR` and forward all signals to the process
|
-a, --attach=false Attach container's STDOUT and STDERR and forward all signals to the process
|
||||||
-i, --interactive=false Attach container's `STDIN`
|
-i, --interactive=false Attach container's STDIN
|
||||||
|
|
||||||
When run on a container that has already been started,
|
When run on a container that has already been started,
|
||||||
takes no action and succeeds unconditionally.
|
takes no action and succeeds unconditionally.
|
||||||
|
@ -1692,7 +1697,7 @@ takes no action and succeeds unconditionally.
|
||||||
|
|
||||||
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
|
Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...]
|
||||||
|
|
||||||
Stop a running container by sending `SIGTERM` and then `SIGKILL` after a grace period
|
Stop a running container by sending SIGTERM and then SIGKILL after a grace period
|
||||||
|
|
||||||
-t, --time=10 Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.
|
-t, --time=10 Number of seconds to wait for the container to stop before killing it. Default is 10 seconds.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue