Open docwhat opened 6 years ago
Hi,
Is there any workaround for this issue? I can reproduce it 100% of time.
Thanks
Nope. I can reproduce it 100% of the time, too...
When you are running DiD I believe you MUST creat the same folder layout on the host as you are attempting to mount things into the inner container from. Eg /var/jenkins_home/workspace
is used in a Jenkins Docker and -v $(pwd):/src/files
is used in a Docker run by Jenkins to build a job, then on the host of the Jenkins Docker I also need /var/jenkins_home/workspace
to exist, even if I was using -v ~/projects/jenkins_docker/jenkins_home:/var/jenkins_home/
when spinning up the Jenkins container.
I was exploring integrating dokken with drone and encountered this as well.
The solution seems to be indicated in where dokken makes its sandboxes:
-----> Starting Kitchen (v1.23.2)
-----> Creating <default-ubuntu-1604>...
Creating kitchen sandbox at /root/.dokken/kitchen_sandbox/b0dce010a4-default-ubuntu-1604
Creating verifier sandbox at /root/.dokken/verifier_sandbox/b0dce010a4-default-ubuntu-1604
Building work image..
As the sandboxes reside in /root/.dokken
, this directory can be mounted from the host back into the DinD, e.g. in .drone.yml
pipeline:
test:
image: chef/chefdk:latest
environment:
- KITCHEN_LOCAL_YAML=.kitchen.dokken.yml
commands:
- chef --version
- kitchen test centos-7
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.dokken:/root/.dokken
Hi @zakame I tried it but I get the same error... Any update on this ?
I can confirm that mounting the volume /root/.dokken
as described will work in our DinD CI system.
I think this is a specific configuration thing that needs to be done on each project and isn't in scope of Dokken.
Been wrestling with this today.
Conclusion: I wonder if one of the following two options is the path of least resistance:
@bbros-dev related to kitchen-local... I believe that functionality is already included with the exec transport already built into kitchen. You can see an example of using that provider in the ark cookbook GitHub Action tests.
Thanks @ramereth we've moved away from DinD and more generally Docker.
This is bug #105 continued but only for the case of running in DinD or CI.