rancher / dapper

Docker build wrapper
Apache License 2.0
365 stars 89 forks source link

DAPPER_DOCKER_SOCKET failing on docker desktop #97

Open clane2812 opened 3 years ago

clane2812 commented 3 years ago

Hello, i try to run dapper with docker-desktop as docker-daemon. I need the docker-daemon inside the container, so i set the DAPPER_DOCKER_SOCKET true in the dapper-file like described. This leads to the following call, which fails:

[INFO]  Building docker container
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
time="2021-06-17T12:28:29+02:00" level=debug msg="Failed running C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe [run -i --name app_test-fCUVeDE -v //./pipe/docker_engine://./pipe/docker_engine -e DAPPER_UID=-1 -e DAPPER_GID=-1 -e 
VERSION --privileged app_test:develop]: exit status 1"
time="2021-06-17T12:28:29+02:00" level=debug msg="Deleting temp container app_test-fCUVeDE"
time="2021-06-17T12:28:30+02:00" level=fatal msg="exit status 1"

The problem seems to be the argument _-v //./pipe/docker_engine://./pipe/dockerengine

When i manually perform the docker run with the argument -v /var/run/docker.sock:/var/run/docker.sock it works.

Is this a bug, parsing the runtime-args or am i missing something? Tried many thing but dit not get it working yet.

thanks for your help!

clane2812 commented 3 years ago

got it running:

ENV DAPPER_DOCKER_SOCKET false ENV DAPPER_RUN_ARGS -v /var/run/docker.sock:/var/run/docker.sock

not the nicest thing but it works for me ... sometimes it can be so easy ... ;)