{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/12786","labels_url":"https://api.github.com/repos/docker/docker/issues/12786/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/12786/comments","events_url":"https://api.github.com/repos/docker/docker/issues/12786/events","html_url":"https://github.com/docker/docker/issues/12786","id":70930903,"number":12786,"title":"Command Examples","user":{"login":"elliot-labs","id":5030490,"avatar_url":"https://avatars.githubusercontent.com/u/5030490?v=3","gravatar_id":"","url":"https://api.github.com/users/elliot-labs","html_url":"https://github.com/elliot-labs","followers_url":"https://api.github.com/users/elliot-labs/followers","following_url":"https://api.github.com/users/elliot-labs/following{/other_user}","gists_url":"https://api.github.com/users/elliot-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/elliot-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliot-labs/subscriptions","organizations_url":"https://api.github.com/users/elliot-labs/orgs","repos_url":"https://api.github.com/users/elliot-labs/repos","events_url":"https://api.github.com/users/elliot-labs/events{/privacy}","received_events_url":"https://api.github.com/users/elliot-labs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-25T16:02:47Z","updated_at":"2015-04-26T19:21:30Z","closed_at":null,"body":"Docker lacks examples for commands. These would be really helpful for understanding the syntax as the --help items are (sometimes) confusing.\r\n\r\nHere is an example:\r\n```\r\ndocker commit --help\r\n\r\nUsage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]\r\n\r\nCreate a new image from a container's changes\r\n\r\n  -a, --author=       Author (e.g., \"John Hannibal Smith <hannibal@a-team.com>\")\r\n\r\n  -c, --change=[]     Apply Dockerfile instruction to the created image\r\n  --help=false        Print usage\r\n  -m, --message=      Commit message\r\n  -p, --pause=true    Pause container during commit\r\n\r\nExamples:\r\ndocker commit syntax goes here\r\nanother example\r\netc...\r\n```\r\nSo essentially the idea would be to append an `Examples:` section to the `--help` for each of the commands.\r\n\r\nThanks and keep up the great work!"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/96422315","html_url":"https://github.com/docker/docker/issues/12786#issuecomment-96422315","issue_url":"https://api.github.com/repos/docker/docker/issues/12786","id":96422315,"user":{"login":"Mic92","id":96200,"avatar_url":"https://avatars.githubusercontent.com/u/96200?v=3","gravatar_id":"","url":"https://api.github.com/users/Mic92","html_url":"https://github.com/Mic92","followers_url":"https://api.github.com/users/Mic92/followers","following_url":"https://api.github.com/users/Mic92/following{/other_user}","gists_url":"https://api.github.com/users/Mic92/gists{/gist_id}","starred_url":"https://api.github.com/users/Mic92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mic92/subscriptions","organizations_url":"https://api.github.com/users/Mic92/orgs","repos_url":"https://api.github.com/users/Mic92/repos","events_url":"https://api.github.com/users/Mic92/events{/privacy}","received_events_url":"https://api.github.com/users/Mic92/received_events","type":"User","site_admin":false},"created_at":"2015-04-26T19:21:29Z","updated_at":"2015-04-26T19:21:29Z","body":"The man page contains at least one example per command.\r\nFor example:\r\n\r\n```\r\n$ man docker-attach\r\nEXAMPLES\r\nAttaching to a container\r\n       In this example the top command is run  inside  a  container,  from  an\r\n       image  called  fedora,  in  detached mode. The ID from the container is\r\n       passed into the docker attach command:\r\n\r\n              # ID=$(sudo docker run -d fedora /usr/bin/top -b)\r\n              # sudo docker attach $ID\r\n```"}}