diff --git a/storage/bind-mounts.md b/storage/bind-mounts.md index ab12f2be96..013cf81e1c 100644 --- a/storage/bind-mounts.md +++ b/storage/bind-mounts.md @@ -376,6 +376,28 @@ $ docker run -d \ nginx:latest ``` + +## Use a bind mount with compose + +A single Docker Compose service with a bind mount looks like this: + +```yaml +version: "{{ site.compose_file_v3 }}" +services: + frontend: + image: node:lts + volumes: + - type: bind + source: ./static + target: /opt/app/staticvolumes: + myapp: +``` + +For more information about using volumes of the `bind` type with Compose, see +[Compose reference on volumes](../compose/compose-file/compose-file-v3.md#volumes). +and +[Compose reference on volume configuration](../compose/compose-file/compose-file-v3.md#volume-configuration-reference). + ## Next steps - Learn about [volumes](volumes.md).