# Mount binds not working

**URL:** <https://forums.docker.com/t/mount-binds-not-working/141632>\
**Category:** General\
**Tags:** docker, build, docker-compose\
**Created:** [May 27, 2024, 12:48am UTC](https://forums.docker.com/t/mount-binds-not-working/141632 "2024-05-27T00:48:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![davihlav](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@davihlav](https://forums.docker.com/u/davihlav)\
**Post date:** [May 27, 2024, 12:48am UTC](https://forums.docker.com/t/mount-binds-not-working/141632/1 "2024-05-27T00:48:33Z")

</div>

So I am new to this and wanted to practice. I created a simple node project:

![Screenshot 2024-05-27 014915](https://global.discourse-cdn.com/docker/original/3X/0/4/044a37a0a310a83585ae0e8faadb3c8eeefb5ec8.png)

I setup express and nodemon. When I run my project locally it works, if I change the code and reload it reflects.

Dockerfile:

```auto
FROM node:18.12.1-alpine

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY ./src ./src

EXPOSE 8080

CMD ["npm", "run", "dev"]

```

package.json:

```auto
 "scripts": {
    "start": "node src/index.js",
    "dev": "nodemon --watch \"./**\" --ext \"js\" --exec \"node src/index.js\""
  },

```

If I run `docker run -v ./src:/src/app/ -p 8080:8080 davihlav/frontend:v1` while in frontend folder changing the code doesn’t update.

Likewise in docker-compose.yml:

```auto
version: '3'
services:
  frontend:
    image: davihlav/frontend:v1
    build: ./frontend
    ports:
      - "8080:8080"
    volumes:
      - ./frontend/src:/app/src

```

Running `docker-compose up --build` in the root folder code update doesn’t work. What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/bluepuma77/32/32688_2.png) [@bluepuma77](https://forums.docker.com/u/bluepuma77)\
**Post date:** [May 27, 2024, 7:27am UTC](https://forums.docker.com/t/mount-binds-not-working/141632/2 "2024-05-27T07:27:13Z")

</div>

You run this in Windows with Docker Desktop or WSL?

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [May 27, 2024, 9:30am UTC](https://forums.docker.com/t/mount-binds-not-working/141632/3 "2024-05-27T09:30:32Z")

</div>

> [@davihlav](#):
>
> while in frontend folder changing the code doesn’t update.

The application or the content of the folder? If the application, it has nothing to do with the bind mount mentioned in the title.

---

<div class="post-metadata">

**Author:** ![davihlav](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@davihlav](https://forums.docker.com/u/davihlav)\
**Post date:** [May 27, 2024, 1:40pm UTC](https://forums.docker.com/t/mount-binds-not-working/141632/4 "2024-05-27T13:40:16Z")

</div>

I have Docker Desktop installed, Im running this in vscode terminal

---

<div class="post-metadata">

**Author:** ![davihlav](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@davihlav](https://forums.docker.com/u/davihlav)\
**Post date:** [May 27, 2024, 1:41pm UTC](https://forums.docker.com/t/mount-binds-not-working/141632/5 "2024-05-27T13:41:03Z")

</div>

Doesn’t matter right? If the content changes so should the application

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [May 27, 2024, 1:56pm UTC](https://forums.docker.com/t/mount-binds-not-working/141632/6 "2024-05-27T13:56:07Z")

</div>

It does matter. That’s why I ask. You can find many topics about it related to nodejs and monitoring content. Bind mount just shares the files with the container, but how the changes can be monitored and how the application can reload the source code, that’s another story.

The version of your Docker Desktop is also important, as there was a bug in a recent version that bind mounted folders were indeed not synchronized with the virtual machine of Docker Desktop.

---

<div class="post-metadata">

**Author:** ![sahilngi425](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/sahilngi425/32/55715_2.png) [@sahilngi425](https://forums.docker.com/u/sahilngi425)\
**Post date:** [February 17, 2025, 1:14am UTC](https://forums.docker.com/t/mount-binds-not-working/141632/7 "2025-02-17T01:14:39Z")

</div>

I have a docker-compose file which amounts the terminal folders of airflow dags from Vs code to docker container. When i see the Bind mounts section in the container, it shows me the source and destinations paths are absolutely correct.  
Not sure what’s wrong there? Is this a permission issue?
