I want to use Docker-in-Docker to run an existing docker-compose file, while mounting files that were generated within the Dagger pipeline. This would allow me to reuse existing Docker Compose workflows without having to rewrite them entirely in Dagger.
What I've Tried
I have four test methods that demonstrate my progression. Each can be invoked from the command line as follows:
dagger call dind-example- Basic Docker-in-Docker (fails)dagger call dind-example-with-docker-socket --docker /var/run/docker.sock- Works with host socketdagger call dind-example-with-file-mount --docker /var/run/docker.sock- Fails to mount generated file- First create a test file:
echo "hello from host" > /tmp/test-host-file.txt, thendagger call dind-example-with-host-file-mount --docker /var/run/docker.sock --host-file-path /tmp/test-host-file.txt- Successfully mounts host file