Hello. Could anyone help me figure out why a command is breaking my dind?
Context:
I want to run dind as a jenkins agent to build application containers and still be isolated from the machine running jenkins. The jenkins docker agent integration a command breaks the connect to the docker daemon. This is what it generates:
docker run -t -d -u 1035:1039 -u 0 --name dind --rm --privileged --network host -e DOCKER_TLS_CERTDIR=/certs -v dind-certs-ca:/certs/ca -v dind-certs-client:/certs/client docker:dind cat
The command I have that is known to work is:
docker run -t -d -u 1035:1039 -u 0 --name dind --rm --privileged --network host -e DOCKER_TLS_CERTDIR=/certs -v dind-certs-ca:/certs/ca -v dind-certs-client:/certs/client docker:dind
Problem:
The cat
command being passed in breaks it. As far as I know there is no way to prevent it from doing this while still using the container integration. The error I get is the standard can’t connect to daemon:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
This is really strange to me that it would break because in the docker file there is:
ENTRYPOINT ["dockerd-entrypoint.sh"]
CMD []
Thanks in advance.