On my local dev machine I use docker.from_env(version=auto)
(docker-py) to get a docker client without any issues. If I run the same statement inside a gitlab-ci
job which run inside a docker container (or with gitlab-runner exec docker ...
during local debugging) to get a docker client I get a DockerException: Error while fetching server API version: ('Connection aborted.', error(2, 'No such file or directory'))
. How can I get a docker client with docker-py
inside a gitlab-ci
job which runs inside a docker container?
I think you'll need to build and deploy your own runner with the following binding '/var/sock/docker.sock:/var/sock/docker.sock.