github.com/fcwu/docker@v1.4.2-0.20150115145920-2a69ca89f0df/docs/man/docker-create.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-create - Create a new container
     6  
     7  # SYNOPSIS
     8  **docker create**
     9  [**-a**|**--attach**[=*[]*]]
    10  [**--add-host**[=*[]*]]
    11  [**-c**|**--cpu-shares**[=*0*]]
    12  [**--cap-add**[=*[]*]]
    13  [**--cap-drop**[=*[]*]]
    14  [**--cidfile**[=*CIDFILE*]]
    15  [**--cpuset**[=*CPUSET*]]
    16  [**--device**[=*[]*]]
    17  [**--dns-search**[=*[]*]]
    18  [**--dns**[=*[]*]]
    19  [**-e**|**--env**[=*[]*]]
    20  [**--entrypoint**[=*ENTRYPOINT*]]
    21  [**--env-file**[=*[]*]]
    22  [**--expose**[=*[]*]]
    23  [**-h**|**--hostname**[=*HOSTNAME*]]
    24  [**--help**]
    25  [**-i**|**--interactive**[=*false*]]
    26  [**--ipc**[=*IPC*]]
    27  [**--link**[=*[]*]]
    28  [**--lxc-conf**[=*[]*]]
    29  [**-m**|**--memory**[=*MEMORY*]]
    30  [**--mac-address**[=*MAC-ADDRESS*]]
    31  [**--name**[=*NAME*]]
    32  [**--net**[=*"bridge"*]]
    33  [**-P**|**--publish-all**[=*false*]]
    34  [**-p**|**--publish**[=*[]*]]
    35  [**--privileged**[=*false*]]
    36  [**--restart**[=*RESTART*]]
    37  [**--security-opt**[=*[]*]]
    38  [**-t**|**--tty**[=*false*]]
    39  [**-u**|**--user**[=*USER*]]
    40  [**-v**|**--volume**[=*[]*]]
    41  [**--volumes-from**[=*[]*]]
    42  [**-w**|**--workdir**[=*WORKDIR*]]
    43  IMAGE [COMMAND] [ARG...]
    44  
    45  # OPTIONS
    46  **-a**, **--attach**=[]
    47     Attach to STDIN, STDOUT or STDERR.
    48  
    49  **--add-host**=[]
    50     Add a custom host-to-IP mapping (host:ip)
    51  
    52  **-c**, **--cpu-shares**=0
    53     CPU shares (relative weight)
    54  
    55  **--cap-add**=[]
    56     Add Linux capabilities
    57  
    58  **--cap-drop**=[]
    59     Drop Linux capabilities
    60  
    61  **--cidfile**=""
    62     Write the container ID to the file
    63  
    64  **--cpuset**=""
    65     CPUs in which to allow execution (0-3, 0,1)
    66  
    67  **--device**=[]
    68     Add a host device to the container (e.g. --device=/dev/sdc:/dev/xvdc:rwm)
    69  
    70  **--dns-search**=[]
    71     Set custom DNS search domains (Use --dns-search=. if you don't wish to set the search domain)
    72  
    73  **--dns**=[]
    74     Set custom DNS servers
    75  
    76  **-e**, **--env**=[]
    77     Set environment variables
    78  
    79  **--entrypoint**=""
    80     Overwrite the default ENTRYPOINT of the image
    81  
    82  **--env-file**=[]
    83     Read in a line delimited file of environment variables
    84  
    85  **--expose**=[]
    86     Expose a port or a range of ports (e.g. --expose=3300-3310) from the container without publishing it to your host
    87  
    88  **-h**, **--hostname**=""
    89     Container host name
    90  
    91  **--help**
    92    Print usage statement
    93  
    94  **-i**, **--interactive**=*true*|*false*
    95     Keep STDIN open even if not attached. The default is *false*.
    96  
    97  **--ipc**=""
    98     Default is to create a private IPC namespace (POSIX SysV IPC) for the container
    99                                 'container:<name|id>': reuses another container shared memory, semaphores and message queues
   100                                 '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.
   101  
   102  **--link**=[]
   103     Add link to another container in the form of name:alias
   104  
   105  **--lxc-conf**=[]
   106     (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
   107  
   108  **-m**, **--memory**=""
   109     Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
   110  
   111  **--mac-address**=""
   112     Container MAC address (e.g. 92:d0:c6:0a:29:33)
   113  
   114  **--name**=""
   115     Assign a name to the container
   116  
   117  **--net**="bridge"
   118     Set the Network mode for the container
   119                                 'bridge': creates a new network stack for the container on the docker bridge
   120                                 'none': no networking for this container
   121                                 'container:<name|id>': reuses another container network stack
   122                                 '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.
   123  
   124  **-P**, **--publish-all**=*true*|*false*
   125     Publish all exposed ports to random ports on the host interfaces. The default is *false*.
   126  
   127  **-p**, **--publish**=[]
   128     Publish a container's port, or a range of ports, to the host
   129                                 format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort
   130                                 Both hostPort and containerPort can be specified as a range of ports. 
   131                                 When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range. (e.g., `-p 1234-1236:1234-1236/tcp`)
   132                                 (use 'docker port' to see the actual mapping)
   133  
   134  **--privileged**=*true*|*false*
   135     Give extended privileges to this container. The default is *false*.
   136  
   137  **--restart**=""
   138     Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
   139  
   140  **--security-opt**=[]
   141     Security Options
   142  
   143  **-t**, **--tty**=*true*|*false*
   144     Allocate a pseudo-TTY. The default is *false*.
   145  
   146  **-u**, **--user**=""
   147     Username or UID
   148  
   149  **-v**, **--volume**=[]
   150     Bind mount a volume (e.g., from the host: -v /host:/container, from Docker: -v /container)
   151  
   152  **--volumes-from**=[]
   153     Mount volumes from the specified container(s)
   154  
   155  **-w**, **--workdir**=""
   156     Working directory inside the container
   157  
   158  # HISTORY
   159  August 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
   160  September 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
   161  November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>