title: Docker sync volumes
body: <p>So... I trying start learning Docker. But I can't sync the host and the container using volumes on change and save code (using the npm run dev). All the time I have to restart the <code>docker-compose up --build</code> to the &quot;sync&quot; kick in, but after this any change don't update the folder or code.   My exemple code:</p>
  <p>install Next.js typescript as base.</p>
  <pre><code>npx create-next-app@latest --ts
  </code></pre>
  <p>Docker-compose:</p>
  <pre><code>version: &quot;3&quot;
  services:
    node-myname:
      build:
        context: .
        dockerfile: DockerFile.dev
      ports:
        - &quot;3000:3000&quot;
      command: &quot;npm run dev&quot;
      restart: always
      volumes:
        - .:/usr/src/home/node/app/
    
  </code></pre>
  <p>DockerFile:</p>
  <pre><code>FROM node:16
  
  WORKDIR /home/node/app
  
  COPY . .
  
  RUN npm install
  </code></pre>
  <p>The recomended is using volumes insted bind...</p>
  <p>I can't find a workaround.</p>