2013-05-21 11:47:16 -06:00
|
|
|
:title: Run Command
|
|
|
|
:description: Run a command in a new container
|
|
|
|
:keywords: run, container, docker, documentation
|
|
|
|
|
2013-04-02 04:52:44 +03:00
|
|
|
===========================================
|
|
|
|
``run`` -- Run a command in a new container
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2013-06-21 11:07:14 +03:00
|
|
|
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
|
2013-04-02 04:52:44 +03:00
|
|
|
|
|
|
|
Run a command in a new container
|
|
|
|
|
|
|
|
-a=map[]: Attach to stdin, stdout or stderr.
|
2013-05-07 11:43:45 -07:00
|
|
|
-c=0: CPU shares (relative weight)
|
2013-07-11 23:38:43 +03:00
|
|
|
-cidfile="": Write the container ID to the file
|
2013-04-02 04:52:44 +03:00
|
|
|
-d=false: Detached mode: leave the container running in the background
|
|
|
|
-e=[]: Set environment variables
|
|
|
|
-h="": Container host name
|
|
|
|
-i=false: Keep stdin open even if not attached
|
|
|
|
-m=0: Memory limit (in bytes)
|
|
|
|
-p=[]: Map a network port to the container
|
|
|
|
-t=false: Allocate a pseudo-tty
|
|
|
|
-u="": Username or UID
|
2013-05-02 09:26:29 -07:00
|
|
|
-d=[]: Set custom dns servers for the container
|
2013-07-16 10:14:21 -07:00
|
|
|
-v=[]: Create a bind mount with: [host-dir]:[container-dir]:[rw|ro]. If "host-dir" is missing, then docker creates a new volume.
|
2013-05-02 12:11:57 -07:00
|
|
|
-volumes-from="": Mount all volumes from the given container.
|
2013-06-24 17:20:05 -09:00
|
|
|
-entrypoint="": Overwrite the default entrypoint set by the image.
|