docker-compose not found from script

I have a Dockerfile which is basically the following:

FROM mhart/alpine-node:5

COPY . /project
WORKDIR /project


And my is quite simple too:

  • Using variables in composer scripts
  • Running Sidekiq inside Docker - Handle termination of Docker container?
  • How to get ssh connection with docker container on OSX(boot2docker)
  • How do I automate two layers of SSH plus a docker exec?
  • Confused about Docker -t option to Allocate a pseudo-TTY
  • How and Where does the official docker image of postgreSQL persist its database
  • #!/bin/sh
    set -e
    docker-compose up -d

    I do have a docker-compose.yml, but there is no point to describe it here.

    First thing I do is to build the docker image by using my Dockerfile, so:

    docker build -t test .

    Then run this image:

    docker run -d test

    Which will launch the

    Unfortunately, I have the following error showing up:

    ./ line 10: docker-compose: not found

    And if I do only ./ without the docker stuff, it works like a charm.

    Where the issue can be possibly coming from?

  • Can't attach volume to docker with jenkins through fig
  • Could not run Calabash-android on docker
  • How to determine cause of slow requests in Flask?
  • What's Docker easiest way to deploy Rails on production?
  • Maven can create folders and lock file, but hangs while downloading
  • Docker volume not available during execution
  • One Solution collect form web for “docker-compose not found from script”

    Try to add the full path to the docker-compose inside the script

    which docker-compose

    Then add this to your script

    set -e
    /usr/bin/some/path/docker-compose up -d

    Your local PATH settings are unknown to the script called by docker. Therefore you have to name the full path.

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