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:

  • Docker - How to check if curl command inside Dockerfile had response code 200
  • Using Docker compose within Google App Engine
  • docker-compose replica hostname
  • Running PhantomJS Selenium Node on Kubernetes
  • Dockerfile Automated Build from Github- Tag not found
  • How can let docker use my network router to assign dhcp ip to containers easily instead of pipework?
  • #!/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?

  • Jhipster application development with Docker and gulp
  • Sharing exclusive files to docker instances from host
  • PyCharm Remote Interpreter: Cannot Execute Docker's Python Binary
  • Docker Tools on Windows Server 2008
  • Point different domains to different Docker containers on a single EC2 instance?
  • Why docker exec is killing nohup process on exit?
  • 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.