# Docker-compose: not found

**URL:** <https://drone.discourse.group/t/docker-compose-not-found/10614>\
**Category:** Drone Support\
**Created:** [November 24, 2019, 12:58pm UTC](https://drone.discourse.group/t/docker-compose-not-found/10614 "2019-11-24T12:58:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammad83](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/muhammad83/32/5739_2.png) [@muhammad83](https://drone.discourse.group/u/muhammad83)\
**Post date:** [November 24, 2019, 12:58pm UTC](https://drone.discourse.group/t/docker-compose-not-found/10614/1 "2019-11-24T12:58:11Z")

</div>

Hi,

I am trying to run a build where one of the steps is to clone a git repo which has a couple of docker containers, bring those up using `docker-compose up -d`. Load some config from another repo, the config is in excel files and I can upload these via api calls.

Once this whole env is up and running, run the tests, upload run report (somewhere) if they are successful tear everything down (`docker-compose stop`). If not successful break execution and leave everything as is to facilitate debugging.

I have gotten as far as getting docker in docker working, i can’t get docker-compose to work. My drone.yml file so far looks like this

```auto
kind: pipeline
type: docker
name: default

clone:
  disable: true
  
steps:
- name: clone
  image: alpine/git
  commands:
  - git clone https://github.com/xxxxxx/xxx-docker.git

- name: build
  image: docker:dind
  commands:
  - sleep 5 # give docker enough time to start
  - cd cop-docker
  - sleep 5
  - pwd
  - docker-compose up -d
  - sleep 5
  - docker ps -a

services:
- name: docker
  image: docker:dind
  privileged: true

- name: docker-compose
  image: docker/compose

  volumes:
  - name: dockersock
    path: /var/run

```

I keep on getting this error

`/usr/drone/bin/init: line 29: docker-compose: not found` or the whole thing just hangs

i have tried everything i can find online and nothing seems to work. Things i have tried so far are

- adding it as a service (docker-compose)
- adding it to the volume
- adding as a step (docker-compose step)
- adding all as one step, clone, docker in docker and docker-compose

any help will be very much appreciated.

---

<div class="post-metadata">

**Author:** ![anhgien](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/anhgien/32/5815_2.png) [@anhgien](https://drone.discourse.group/u/anhgien)\
**Post date:** [November 24, 2019, 4:01pm UTC](https://drone.discourse.group/t/docker-compose-not-found/10614/2 "2019-11-24T16:01:09Z")

</div>

Duplicated `volumes` define, just remove one

---

<div class="post-metadata">

**Author:** ![muhammad83](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/muhammad83/32/5739_2.png) [@muhammad83](https://drone.discourse.group/u/muhammad83)\
**Post date:** [November 24, 2019, 8:56pm UTC](https://drone.discourse.group/t/docker-compose-not-found/10614/3 "2019-11-24T20:56:31Z")

</div>

Sorry that was a typo in copy paste, I have updated the yml file, it only has one volume across steps and services. Still getting the same error

---

<div class="post-metadata">

**Author:** ![jsussman](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/jsussman/32/5244_2.png) [@jsussman](https://drone.discourse.group/u/jsussman)\
**Post date:** [November 24, 2019, 9:54pm UTC](https://drone.discourse.group/t/docker-compose-not-found/10614/4 "2019-11-24T21:54:02Z")

</div>

> `/usr/drone/bin/init: line 29: docker-compose: not found` or the whole thing just hangs

This is because the `docker:dind` image does not contain `docker-compose`. We can validate this on any machine with docker installed via:

```sh
 docker run --rm -it docker:dind sh
/ # docker-compose --help
sh: docker-compose: not found

```

The workflow you are trying to accomplish with `docker-compose` isn’t very standard and users typically spin up everything via services instead since they are native to Drone. I highly recommend you read the documentation for [services](https://docs.drone.io/pipeline/kubernetes/syntax/services/) to better understand how they work.
