Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Container command could not be invoked

Just encountered this error message while trying to bring up a docker-compose stack on my local machine. I have a Dockerfile which is identical to the official Wordpress image. My docker-compose file looks like this:

wordpress:
  image: joystick/wp
  ports:
    - "8000:80"
  links:
    - wordpress_db:mysql
  environment:
    - WORDPRESS_DB_HOST=mysql
    - WORDPRESS_DB_NAME=wordpress
    - WORDPRESS_DB_USER=admin
    - WORDPRESS_DB_PASSWORD=password
wordpress_db:
  image: tutum/mysql
  environment:
    - ON_CREATE_DB=wordpress
    - MYSQL_PASS=password

When I change the "image" part at the beginning of this to "wordpress" and use the official image, everything comes up as I'd expect. But when I try to build my own image first, and then use it in this docker-compose file, I get the error message "Container command could not be invoked".

I tried adding a "command" node into the "wordpress" section of this docker-compose, but that did not work.

like image 805
Randy L Avatar asked Feb 11 '16 23:02

Randy L


1 Answers

If you're building from official images, e.g. https://github.com/docker-library/wordpress/tree/master/apache, note the file docker-entrypoint.sh. It must be executable, I set 755 and managed to build the image and run the container.

like image 137
vitr Avatar answered Oct 24 '22 00:10

vitr