Image

Use Bind Volumes

Bind Volumes are essential to the Drupal developer when using Docker. They allow you to synchronize a directory on your laptop or workstation with a directory in the container. Changes can be replicated in either direction -- from the container to the host OS, or from the host OS to the container. You can add a bind volume to a Compose file with just a single line of code.

In this tutorial, we'll:

  • Describe how to use the volumes key in your Compose file
  • Best practices for describing mount points
  • Introduce different synchronization strategies for volumes and which to use