0

Hey I tried running the command

sudo docker run -d -P training/webapp python app.py"

from the tutorial but I keep getting the error

FATA[0000] Error response from daemon: Cannot start container.

I downloaded the image fine but the trouble occurs whenever I try to run it. I checked the port sudo docker port (name) and nothing shows up. I'm guessing the issue is that the PORTS aren't being set up properly. I have a mac and I'm using vmware with ubuntu and I downloaded the ubuntu set up for docker.

Is there anyway to fix this? Any help would be greatly appreciated.

d6bels
  • 1,432
  • 2
  • 18
  • 30
Ph33ly
  • 663
  • 3
  • 13
  • 29
  • can you post `docker images | grep training` ? – user2915097 Mar 04 '15 at 16:27
  • Yep, this is the output: `8:training/webapp latest 31fa814ba25a 9 months ago 278.8 MB` – Ph33ly Mar 04 '15 at 16:36
  • ok, so now let's check the logs `docker logs 31f` – user2915097 Mar 04 '15 at 16:39
  • Another problem: `FATA[0000] Error response from daemon: No such container: 31f ` – Ph33ly Mar 04 '15 at 16:46
  • Yes, it is not the image that we should check, `docker events --since '2015-03-04'` – user2915097 Mar 04 '15 at 16:51
  • Sorry its kinda messy: `2015-03-04T16:03:41.000000000Z 9e09fc2742d1a5e61d4453ca877db4709441432ea25a3b348a453ad412080da3: (from training/webapp:latest) create` `2015-03-04T16:03:41.000000000Z 9e09fc2742d1a5e61d4453ca877db4709441432ea25a3b348a453ad412080da3: (from training/webapp:latest) die` – Ph33ly Mar 04 '15 at 16:54
  • So it dies immediately, may be you should restart docker, `kill -9`of the docker process, and then restart in debug mode `docker -D -d` – user2915097 Mar 04 '15 at 17:05
  • Is there a command to restart docker? I tried debug mode and was returned with `INFO[0000] +job serveapi(unix:///var/run/docker.sock)` `FATA[0000] pid file found, ensure docker is not running or delete /var/run/docker.pid ` – Ph33ly Mar 04 '15 at 17:32
  • extract from http://docs.docker.com/reference/commandline/cli/#daemon I see `To run the daemon with debug output, use docker -d -D` – user2915097 Mar 04 '15 at 17:36
  • I t seems you forgot to stop the docker daemon first, the `kill -9`of the docker process – user2915097 Mar 04 '15 at 17:43
  • Ok I executed `kill -9` with no problems and tried to run `docker -d -D` but the same error showed up again `INFO[0000] +job serveapi(unix:///var/run/docker.sock)` `FATA[0000] pid file found, ensure docker is not running or delete /var/run/docker.pid ` – Ph33ly Mar 04 '15 at 18:00

0 Answers0