I just created a container manually, like this:
docker run -d --restart=always tacodata/pythondev sleep 10
note, that the daemon starts, but the container exits in 10 seconds. Everytime I do a docker ps I see:
core@pa2 ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69cbae4b6459 tacodata/pythondev:latest "sleep 10" About a minute ago Up 9 seconds 5000/tcp high_colden
So, the container was created a minute ago, but the status shows it up only 9 seconds. It keeps restarting. You can get that information from:
core@pa2 ~ $ docker inspect high_colden
[{
"AppArmorProfile": "",
...
"Path": "sleep",
"ProcessLabel": "",
"ResolvConfPath": "/var/lib/docker/containers/69cbae4b645926b14d86effcfaaa7735119e7f0c8afb0baff5cc1913583bf35a/resolv.conf",
"RestartCount": 16,
"State": {
"Error": "",
"ExitCode": 0,
"FinishedAt": "2015-04-16T16:36:15.325629703Z",
"OOMKilled": false,
"Paused": false,
"Pid": 13453,
"Restarting": false,
"Running": true,
"StartedAt": "2015-04-16T16:36:15.860163812Z"
},
"Volumes": {},
"VolumesRW": {}
}
docker exec -it <container_id> bash
to get into the container shell. Thanks, this method works, a little inconvenience is I don't know what process I should kill to cause exit, so I try one by one. Anyway, it restarts indeed :) – Carbajal