commit.rst 854 B

123456789101112131415161718192021222324252627
  1. ===========================================================
  2. ``commit`` -- Create a new image from a container's changes
  3. ===========================================================
  4. ::
  5. Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY [TAG]]
  6. Create a new image from a container's changes
  7. -m="": Commit message
  8. -author="": Author (eg. "John Hannibal Smith <hannibal@a-team.com>"
  9. -run="": Config automatically applied when the image is run. "+`(ex: {"Cmd": ["cat", "/world"], "PortSpecs": ["22"]}')
  10. Full -run example::
  11. {"Hostname": "",
  12. "User": "",
  13. "Memory": 0,
  14. "MemorySwap": 0,
  15. "PortSpecs": ["22", "80", "443"],
  16. "Tty": true,
  17. "OpenStdin": true,
  18. "StdinOnce": true,
  19. "Env": ["FOO=BAR", "FOO2=BAR2"],
  20. "Cmd": ["cat", "-e", "/etc/resolv.conf"],
  21. "Dns": ["8.8.8.8", "8.8.4.4"]}