run.rst 870 B

1234567891011121314151617181920212223
  1. ===========================================
  2. ``run`` -- Run a command in a new container
  3. ===========================================
  4. ::
  5. Usage: docker run [OPTIONS] IMAGE COMMAND [ARG...]
  6. Run a command in a new container
  7. -a=map[]: Attach to stdin, stdout or stderr.
  8. -c=0: CPU shares (relative weight)
  9. -d=false: Detached mode: leave the container running in the background
  10. -e=[]: Set environment variables
  11. -h="": Container host name
  12. -i=false: Keep stdin open even if not attached
  13. -m=0: Memory limit (in bytes)
  14. -p=[]: Map a network port to the container
  15. -t=false: Allocate a pseudo-tty
  16. -u="": Username or UID
  17. -d=[]: Set custom dns servers for the container
  18. -v=[]: Creates a new volumes and mount it at the specified path.
  19. -volumes-from="": Mount all volumes from the given container.