How can I specify a custom path for docker.sock while mentioning the resources or while mentioning container inside the task?
I am running the agent as a service on a linux machine which has docker installed but the socket is not at its default location. I want to run jobs inside a docker but the build fails as I am not able to specify the docker.sock path.
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.
How can I specify a custom path for docker.sock while mentioning the resources or while mentioning container inside the task?
I am running the agent as a service on a linux machine which has docker installed but the socket is not at its default location. I want to run jobs inside a docker but the build fails as I am not able to specify the docker.sock path.
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)