{"action":"created","issue":{"url":"https://api.github.com/repos/docker/compose/issues/1814","labels_url":"https://api.github.com/repos/docker/compose/issues/1814/labels{/name}","comments_url":"https://api.github.com/repos/docker/compose/issues/1814/comments","events_url":"https://api.github.com/repos/docker/compose/issues/1814/events","html_url":"https://github.com/docker/compose/issues/1814","id":99373069,"number":1814,"title":"Docker compose restart and docker restart not working the same way for exited containers?","user":{"login":"tarlabs","id":5294143,"avatar_url":"https://avatars.githubusercontent.com/u/5294143?v=3","gravatar_id":"","url":"https://api.github.com/users/tarlabs","html_url":"https://github.com/tarlabs","followers_url":"https://api.github.com/users/tarlabs/followers","following_url":"https://api.github.com/users/tarlabs/following{/other_user}","gists_url":"https://api.github.com/users/tarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarlabs/subscriptions","organizations_url":"https://api.github.com/users/tarlabs/orgs","repos_url":"https://api.github.com/users/tarlabs/repos","events_url":"https://api.github.com/users/tarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarlabs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-06T07:11:19Z","updated_at":"2015-08-06T10:00:37Z","closed_at":null,"body":"I have a very simple `docker-compose.yml` file in `docker-restart` folder\r\n\r\n```yaml\r\nmysql:\r\n  image: mysql\r\n  environment:\r\n    - \"MYSQL_ROOT_PASSWORD=root\"\r\nubuntu:\r\n  image: ubuntu:14.04\r\n  command: date\r\n```\r\n\r\nNow if I run the below set of commands\r\n```bash\r\n$ docker-compose up -d\r\n$ sleep 10\r\n$ docker-compose restart dockerrestart_ubuntu_1\r\n$ docker restart dockerrestart_ubuntu_1\r\n$ docker-compose restart dockerrestart_ubuntu_1\r\n$ docker restart dockerrestart_ubuntu_1\r\n```\r\n\r\nIf I check the logs, I would expect 5 date times, but only 3 appears, docker restart does restart and execute the container but docker-compose doesn't\r\n\r\n```bash\r\n$ docker logs dockerrestart_ubuntu_1\r\nThu Aug  6 07:01:12 UTC 2015\r\nThu Aug  6 07:02:32 UTC 2015\r\nThu Aug  6 07:03:14 UTC 2015\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/compose/issues/comments/128313261","html_url":"https://github.com/docker/compose/issues/1814#issuecomment-128313261","issue_url":"https://api.github.com/repos/docker/compose/issues/1814","id":128313261,"user":{"login":"tarlabs","id":5294143,"avatar_url":"https://avatars.githubusercontent.com/u/5294143?v=3","gravatar_id":"","url":"https://api.github.com/users/tarlabs","html_url":"https://github.com/tarlabs","followers_url":"https://api.github.com/users/tarlabs/followers","following_url":"https://api.github.com/users/tarlabs/following{/other_user}","gists_url":"https://api.github.com/users/tarlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/tarlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarlabs/subscriptions","organizations_url":"https://api.github.com/users/tarlabs/orgs","repos_url":"https://api.github.com/users/tarlabs/repos","events_url":"https://api.github.com/users/tarlabs/events{/privacy}","received_events_url":"https://api.github.com/users/tarlabs/received_events","type":"User","site_admin":false},"created_at":"2015-08-06T10:00:37Z","updated_at":"2015-08-06T10:00:37Z","body":"Yes, that is the issue as well. Because there may be some containers which does config and exit and when we restart them they should re-run and exit again. So docker-compose restart should work the way docker restart would work and that what the original bug i opened for."}}