Skip to content

Instantly share code, notes, and snippets.

@ulope
Created September 18, 2013 14:35
Show Gist options
  • Save ulope/6610097 to your computer and use it in GitHub Desktop.
Save ulope/6610097 to your computer and use it in GitHub Desktop.
docker help run
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Run a command in a new container
-a=map[]: Attach to stdin, stdout or stderr.
-c=0: CPU shares (relative weight)
-cidfile="": Write the container ID to the file
-d=false: Detached mode: Run container in the background, print new container id
-dns=[]: Set custom dns servers
-e=[]: Set environment variables
-entrypoint="": Overwrite the default entrypoint of the image
-h="": Container host name
-i=false: Keep stdin open even if not attached
-m=0: Memory limit (in bytes)
-n=true: Enable networking for this container
-p=[]: Expose a container's port to the host (use 'docker port' to see the actual mapping)
-t=false: Allocate a pseudo-tty
-u="": Username or UID
-v=map[]: Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)
-volumes-from="": Mount volumes from the specified container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment