you will need to add 2 parameters to your docker run command line which are -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker (Change it with your path)
My agent is a running as a service. The docker installed on the agent is having its docker.sock file at a different place. As I am not running the docker run command manually is there a way I could specify it in the above configurations?
I tried giving it under resources > containers > container > options but that didn't work.
In order to use Docker from within a Docker container, you need to [bind-mount}(docs.docker.com/storage/bind-mounts/) the Docker socket.
you will need to add 2 parameters to your docker run command line which are
-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker
(Change it with your path)Thank you for the reply Davide! :)
The way I have configured my pipeline is somewhat like this
My agent is a running as a service. The docker installed on the agent is having its docker.sock file at a different place. As I am not running the docker run command manually is there a way I could specify it in the above configurations?
I tried giving it under resources > containers > container > options but that didn't work.
Well, that should be in the
docker run
of your agent container (in the script you use to start the container that has the agent in it)