title: Docker Compose couldn't find a package.json file in "/app"
body: <p>Here is my project struture</p>
  <pre><code>.
  ├── README.md
  ├── docker-compose.yml
  └── frontend
      ├── Dockerfile
      ├── README.md
      ├── build
      ├── package.json
      ├── yarn.lock
      └── ...
  </code></pre>
  <p>Docker-compose.yml</p>
  <pre><code>version: '3.7'
  
  services:
    frontend:
      build:
        context: frontend
        dockerfile: Dockerfile
      volumes:
        - '.:/app'
        - '/app/node_modules'
      ports:
        - 3000:3000
  </code></pre>
  <p>Dockerfile</p>
  <pre><code>FROM node:14-alpine
  
  WORKDIR /app
  
  COPY ./package.json /app/package.json
  RUN yarn install --no-lockfile
  
  COPY . .
  
  CMD [&quot;yarn&quot;, &quot;start&quot;]
  </code></pre>
  <p>If i build container using docker, it works fine</p>
  <p>But <code>docker-compose up --build</code> always returns</p>
  <pre><code>Attaching to book-marketplace_frontend_1
  frontend_1  | yarn run v1.22.15
  frontend_1  | error Couldn't find a package.json file in &quot;/app&quot;
  frontend_1  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
  book-marketplace_frontend_1 exited with code 1
  </code></pre>
  <p>it's weird that docker-compose can still run yarn install ( which needs package.json) but can not locate it later. Hope someone can help me</p>