# Docker develop vs volume mount

**URL:** <https://forums.docker.com/t/docker-develop-vs-volume-mount/143892>\
**Category:** General\
**Created:** [September 20, 2024, 8:27pm UTC](https://forums.docker.com/t/docker-develop-vs-volume-mount/143892 "2024-09-20T20:27:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaborjbernat](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/gaborjbernat/32/51784_2.png) [@gaborjbernat](https://forums.docker.com/u/gaborjbernat)\
**Post date:** [September 20, 2024, 8:27pm UTC](https://forums.docker.com/t/docker-develop-vs-volume-mount/143892/1 "2024-09-20T20:27:09Z")

</div>

Can somone explain to me what is the difference and advantages of using docker compose develop vs volume?

[Compose Develop Specification | Docker Docs](https://docs.docker.com/reference/compose-file/develop) is not deep on this. Any reason I should do:

```yaml
services:
  app:
    build:
      target: develop
    command: tail -F /dev/null
    volumes:
      - ".:/w:Z"
    working_dir: "/w"

```

or

```auto
services:
  app:
    build:
      target: develop
    command: tail -F /dev/null
    develop:
          watch: 
            - action: sync
               path: .
              target: /w
    working_dir: "/w"

```

Any performance or other benefits of develop watch over mounting the volume?

---

<div class="post-metadata">

**Author:** ![deanayalon](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/deanayalon/32/49113_2.png) [@deanayalon](https://forums.docker.com/u/deanayalon)\
**Post date:** [September 20, 2024, 9:41pm UTC](https://forums.docker.com/t/docker-develop-vs-volume-mount/143892/2 "2024-09-20T21:41:50Z")

</div>

One thing is that it doesn’t go both ways

If you change data within a container’s bind mounted volume, it will change on the host

With `docker compose watch` set to sync, only changes on the host reflect to the container, changes to the container do not change the data on the host

Docker Compose Watch also takes `.dockerignore` into account, while bind mounts do not

> **[Use Compose Watch](https://docs.docker.com/compose/how-tos/file-watch/#compose-watch-versus-bind-mounts)**
>
> Use File watch to automatically update running services as you work
