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
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.