drone (Docker-Compose in docker?) drone (Docker-Compose in docker?) docker docker

drone (Docker-Compose in docker?)


The docker:dind container does not seem to have "docker-compose" installed. You can try using the docker/compose:1.23.2 container. You need to mount the docker socket file if you intend on using your host docker resources (ie. images, networks). Otherwise, you need to mount your directory with the docker-compose file to the /code directory.

docker/compose image reference: https://hub.docker.com/r/docker/compose/

See code below for reference:

kind: pipelinename: defaultsteps:- name: test  image: compose:1.23.2  volumes:  - name: docker_sock    path: /var/run/docker.sock  commands:  - up -f /drone/src/docker-compose.yamlvolumes:  - name: docker_sock    host:      path: /var/run/docker.sock


you can use this yml for drone run docker compose :

- name: publish  image: docker/compose:1.25.0-rc2-alpine  commands:    - docker-compose -f <docker compose filename>.yml up -d  volumes:    - name: dockersock      path: /var/run/docker.sock  depends_on:    - build