[SOLVED] Container command not found or does not exist error with Docker

1 post / 0 new
#1 Tue, 2016-03-01 16:50
grubar
  • grubar's picture
  • Offline
  • Last seen: 2 years 1 month ago
  • Joined: 2016-03-01

Hello folks,

I'm trying to migrate my docker image from Ubuntu to Alpine. Everything builds fine, but when the time to run the /start.sh script comes, it fails.

The Dockerfile is here. I believe the problem lies in the CMD line, but I'm not sure.

If I try to run it :
docker run test/alpine
I get :
exec: "/bin/sh /start.sh": stat /bin/sh /start.sh: no such file or directory
docker: Error response from daemon: Container command not found or does not exist..

Of course /start.sh is here and executable. If I do :
docker run test/alpine sh
And then (inside the container):
/bin/sh /start.sh
It works.

Has anyone have an idea on why I get this error ?

Thanks for reading :)

Regards,
~G

EDIT: after discussing with folks on the IRC channel, changing the CMD to /start.sh && exec /usr/bin/supervisord -c /etc/supervisord.conf -n works if I do a "docker run test/alpine". But starting it with docker-compose still fails with the same error...

EDIT2: ok it works now, had to change "build: ." to "image test/alpine" in .yml file \o/