I am pretty new to docker and was following the documentation found here, trying deploy several containers inside dind using docker-compose 1.14.0 I get the following
docker run -v /home/dudarev/compose/:/compose/ --privileged docker:dind /compose/docker-compose
/usr/local/bin/dockerd-entrypoint.sh: exec: line 21: /compose/docker-compose: not found
Did I miss something?
Add docker-compose installation to your Dockerfile before executing docker run.
For example, if you have an Ubuntu docker, add to your Dockerfile:
Because it looks like if your entry-point looks up docker compose in /compose folder, while docker-compose is installed in /usr/local/bin by default.
There is official docker image on dockerhub for docker-compose, just use that.
Follow these steps:
mkdir /root/test
docker-compose.yaml
file with following contents:docker run
command to run docker-compose inside the container.NOTE: Here /var/tmp directory inside the container will contain docker-compose.yaml file so I have used
-f
option to specify complete path of the yaml file. Alsodocker.sock
is mounted from host onto the container.Hope this helps.