How can I use Docker volume mounting on CircleCI?

If we use the base cimg provided by CircleCI, the default working directory should be /home/circleci/project. However, when a customized image is used and volume mounting is needed, you can see the following error message:

Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /root/project/tests/docker/data

 

Mounting Local Directories

It's not possible to use Docker volume mounting with the docker executor, but using the machine executor it's possible to mount local directories to your running Docker containers. You can learn more about the machine executor here on our docs page.

 

Additional Resources

Was this article helpful?
44 out of 112 found this helpful

Comments

0 comments

Article is closed for comments.