commit.rst 875 B

12345678910111213141516171819202122232425262728
  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. "CpuShares": 0,
  14. "Memory": 0,
  15. "MemorySwap": 0,
  16. "PortSpecs": ["22", "80", "443"],
  17. "Tty": true,
  18. "OpenStdin": true,
  19. "StdinOnce": true,
  20. "Env": ["FOO=BAR", "FOO2=BAR2"],
  21. "Cmd": ["cat", "-e", "/etc/resolv.conf"],
  22. "Dns": ["8.8.8.8", "8.8.4.4"]}