Closed indaco closed 6 months ago
You can pass the DOCKER_HOST
variable to Gitness to override the host address
DOCKER_HOST=tcp://localhost:2375
Note that DOCKER_CERT_PATH
, DOCKER_TLS_VERIFY
and DOCKER_API_VERSION
are also supported.
Thanks a lot @bradrydzewski. It works.
For future references...
set POST=1
on docker-socket-proxy config in addition to other settings
Best practices for docker encourage to avoid accessing the Docker API without any restriction (aka
/var/run/docker.sock
)Possible solutions are expose the Docker socket over TCP or SSH. For TCP exposing I use the TecnativaDocker Socket Proxy. This approach requires to connect the docker client to that socket exposed as e.g.
tcp://docker-socket-proxy:2375
E.g.
providers.docker.endpoint=tcp://docker-socket-proxy:2375
command: -H tcp://docker-socket-proxy:2375
in mydocker-compose.yml
file and removing/var/run/docker.sock:/var/run/docker.sock
from the volumesHow to achieve that with gitness? I tried:
command
as in portainer but gitness does not start at allGITNESS_URL_CONTAINER=tcp://docker-socket-proxy:2375
. Executing a pipeline I get the followingAny advice? Thanks