title: How to use properly of COPY and bind-mount
body: <p>When I develop sample app and read docker <a href="https://docs.docker.com/engine/reference/builder/" rel="nofollow noreferrer">document</a> and I noticed that what is the difference between <code>COPY</code> command and <code>bind-mount</code> our setting is like follows.
  I understood that <code>COPY</code> will copy local file to container at initial build time.and <code>bind-mount</code> will sync local directory to container directory.</p>
  <p>it seems same functionality. so that I would like to know how to use them properly. if someone has opinion,please let me know. Thanks</p>
  <p><code>docker-compose</code></p>
  <pre><code>version: &quot;3&quot;
  services:
    form-api:
      container_name: &quot;api&quot;
      env_file: .env.development
      build:
        context: .
        dockerfile: ./packagesapi/Dockerfile
      tty: true
      ports:
        - 3303:3303
      depends_on:
        - dynamodb-local
        - database
      volumes:
        - ./packages/form-api/:/app/packages/form-api/
        - ./packages/infrastructure/:/app/packages/infrastructure/
        - ./packages/library/:/app/packages/library/
  </code></pre>
  <p><code>dockerfile</code></p>
  <pre><code>FROM node:16.10-buster
  ENV LANG C.UTF-8
  ENV TZ 'Asia/Tokyo'
  ENV DEBCONF_NOWARNINGS=yes
  
  # Create app directory
  WORKDIR /app
  
  RUN apt-get update &amp;&amp; apt-get install -y postgresql-client
  RUN npm install -g npm@7.18.1 serverless serverless-offline
  
  # root
  COPY .npmrc ./
  COPY ./package*.json ./
  COPY ./tsconfig.json ./
  COPY ./tsconfig.build.json ./
  
  COPY ./packages/library ./packages/library
  COPY ./packages/infrastructure/ ./packages/infrastructure/
  COPY ./packages/form-api/ ./packages/form-api/
  
  RUN npm install
  </code></pre>