Docker compose error: compose.cli.main.main: Container command could not be invoked

I am trying to run haproxy in a docker container. To build and run the haproxy from the image, docker-compose reads my .yaml file below.

proxy:
    build: ./
    env_file: .env
    ports:
    - "8000:80"
    - "9000:9000"

After executing a docker-compose build, the image is created but while trying to spawn a container using the following, I am getting the following errors:

  • Spin down unused Dokku containers (and spin them up upon access)
  • JRebel & Docker bean initializing error
  • docker-compose: define mount for bind mount and managed mount
  • marathon & docker - why is marathon trying to execute docker image continuosly?
  • Docker: build using git push instead of ADD . /myapp
  • Postgres sql file seems to not finish
  • $ docker-compose up -d
    Starting my_haproxy_container
    ←[31mERROR←[0m: Container command could not be invoked.
    

    By docker install information:

    $ docker version
    Client:
     Version:      1.10.2
     API version:  1.22
     Go version:   go1.5.3
     Git commit:   c3959b1
     Built:        Mon Feb 22 22:37:33 2016
     OS/Arch:      windows/amd64
    
    Server:
     Version:      1.10.3
     API version:  1.22
     Go version:   go1.5.3
     Git commit:   20f81dd
     Built:        Thu Mar 10 21:49:11 2016
     OS/Arch:      linux/amd64
    

    I am not sure why the docker-compose up -d is unable to bring up the container. Any information is much appreciated. Thank you.

  • Base image for java
  • Can't access OpenShift console on http://ip:8443
  • Host screen turns off when I start X server in docker container
  • Docker cannot build because can't find matching distribution of a requirement
  • Running docker-maven-plugin on the very end of parent pom building
  • Way to delete the images from Private Docker Registry
  • One Solution collect form web for “Docker compose error: compose.cli.main.main: Container command could not be invoked”

    Container command could not be invoked
    Is means you have problems with CMD in your Dockerfile. It is not docker-compose problem.

    • Incorrect CMD command
    • Command in CMD tries to run file without -execute permission

    Check you ./Dockerfile

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.