title: Failed to compose with Docker with "failed to walk"
body: <p>I've received this error code while composing on the latest docker desktop version 4.4.4 for windows: <code>docker-compose -f ./docker-compose.yml up</code></p>
  <pre><code>failed to solve: rpc error: code = Unknown desc = failed to compute cache key: failed to walk /var/lib/docker/tmp/buildkit-mount067465596/build/dist: lstat /var/lib/docker/tmp/buildkit-mount067465596/build/dist: no such file or directory
  </code></pre>
  <p>This is my docker-compose.yml in the root of the all projects:</p>
  <pre><code>  version: &quot;3.9&quot;
      services: 
        frontend:
          build:
            context: frontend
            dockerfile: Dockerfile.prod
          ports: 
            - &quot;80:80&quot;
          environment:
            - NODE_ENV=production
  </code></pre>
  <p>And this is the Dockerfile.prod which is in the frontend directory.</p>
  <pre><code>ARG WORK_DIR=/build
  
  #stage 1
  FROM node:16-alpine as builder
  
  ARG WORK_DIR
  ENV PATH ${WORK_DIR}/node_modules/.bin:$PATH
  
  RUN mkdir ${WORK_DIR}
  WORKDIR ${WORK_DIR}
  
  COPY package*.json ${WORK_DIR}
  
  #RUN npm install -g npm@latest
  RUN npm install @angular/cli
  RUN npm install
  
  COPY . ${WORK_DIR}
  
  CMD ng build --prod
  
  #stage 2
  FROM nginx:latest
  
  ARG WORK_DIR
  
  #COPY --from=builder ${WORK_DIR}/dist/frontend /usr/share/nginx/html
  COPY --from=builder ${WORK_DIR}/dist/frontend /usr/share/nginx/html
  COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
  EXPOSE 80
  CMD nginx -g &quot;daemon off;&quot;
  </code></pre>
  <p>Here the entire error message</p>
  <pre><code>=&gt; ERROR [stage-1 2/3] COPY --from=builder /build/dist/frontend /usr/share/nginx/html   0.0s 
  ------
   &gt; [stage-1 2/3] COPY --from=builder /build/dist/frontend /usr/share/nginx/html:
  ------
  failed to solve: rpc error: code = Unknown desc = failed to compute cache key: failed to walk /var/lib/docker/tmp/buildkit-mount067465596/build/dist: lstat /var/lib/docker/tmp/buildkit-mount067465596/build/dist: no such file or directory
  </code></pre>
  <p>This is my directory structure.</p>
  <p><a href="https://i.stack.imgur.com/s2zPZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s2zPZ.png" alt="enter image description here" /></a></p>