Zenbot: COPY --chown=node --from=builder /app/dist /app/dist/ fails

Created on 13 Nov 2020  路  6Comments  路  Source: DeviaVir/zenbot

when i run the docker-compose (unchanged) i get an error at this line in dockerfile:
COPY --chown=node --from=builder /app/dist /app/dist/

Step 13/17 : COPY --chown=node --from=builder /app/dist /app/dist/
ERROR: Service 'server' failed to build: COPY failed: stat /var/lib/docker/btrfs/subvolumes/cb7c6c46c6c5a3bd5f5d06969498db35a07737d06713e977e61989f9ae077c8a/app/dist: no such file or directory
bug

Most helpful comment

To solve this bug, in Dockerfile comment/delete above line and run docker-compose build again:
COPY --chown=node --from=builder /app/dist /app/dist/

All 6 comments

Getting the same here, using docker-compose up

Step 10/17 : COPY --chown=node . /app
 ---> 7dda392c6330
Step 11/17 : COPY --chown=node --from=builder /usr/local/lib/node_modules/ /usr/local/lib/node_modules/
 ---> 143a1de847d2
Step 12/17 : COPY --chown=node --from=builder /app/node_modules /app/node_modules/
 ---> 83f19c550e59
Step 13/17 : COPY --chown=node --from=builder /app/dist /app/dist/
ERROR: Service 'server' failed to build: COPY failed: stat /var/lib/docker/overlay2/17a2f7770f1a6ab948441b765e28f1907dce74aa9788b21ed2fc2dc986f2fce0/merged/app/dist: no such file or directory

More of the same here with sudo docker-compose --verbose -f docker-compose.yml up --build -d

Step 13/17 : COPY --chown=node --from=builder /app/dist /app/dist/
ERROR: compose.cli.main.main: Service 'server' failed to build : COPY failed: stat /var/lib/docker/overlay2/6ee50fcc2d01d30121b1df0850489690b725d1522faba51d1d9fefea3b1dc338/merged/app/dist: no such file or directory

Getting the same here, using docker-compose up

Step 13/17 : COPY --chown=node --from=builder /app/dist /app/dist/
ERROR: Service 'server' failed to build: COPY failed: stat /var/lib/docker/overlay2/19f2ff98ee7573ebadf2fceefc78216a79f8986656a43303849460388f51a3cb/merged/app/dist: no such file or directory

Same here:

Building server
Step 1/17 : FROM node:10 as builder
 ---> 2db91b8e7c1b
Step 2/17 : ADD . /app
 ---> Using cache
 ---> 05da0365abbf
Step 3/17 : WORKDIR /app
 ---> Using cache
 ---> f1be01670cd7
Step 4/17 : RUN npm install -g node-gyp
 ---> Using cache
 ---> afc331dbd906
Step 5/17 : RUN npm install --unsafe
 ---> Using cache
 ---> d5344e99adeb
Step 6/17 : FROM node:10-alpine
 ---> b328632eb00c
Step 7/17 : COPY zenbot.sh /usr/local/bin/zenbot
 ---> Using cache
 ---> 99040d971b3c
Step 8/17 : WORKDIR /app
 ---> Using cache
 ---> 980202502c78
Step 9/17 : RUN chown -R node:node /app
 ---> Using cache
 ---> 85bca46e8cf2
Step 10/17 : COPY --chown=node . /app
 ---> Using cache
 ---> 301bce2676c0
Step 11/17 : COPY --chown=node --from=builder /usr/local/lib/node_modules/ /usr/local/lib/node_modules/
 ---> Using cache
 ---> 57f1144a1fbe
Step 12/17 : COPY --chown=node --from=builder /app/node_modules /app/node_modules/
 ---> Using cache
 ---> 935c5c0ea424
Step 13/17 : COPY --chown=node --from=builder /app/dist /app/dist/
ERROR: Service 'server' failed to build : COPY failed: stat /var/lib/docker/overlay2/5a3fbf92ba250dca1da406e7824fbb7112b00059be74499ce2792f0e8c139c3c/merged/app/dist: no such file or directory

To solve this bug, in Dockerfile comment/delete above line and run docker-compose build again:
COPY --chown=node --from=builder /app/dist /app/dist/

I've made a pull request for this:
https://github.com/DeviaVir/zenbot/pull/2582

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nedievas picture nedievas  路  4Comments

michaelr524 picture michaelr524  路  3Comments

KryptoNova picture KryptoNova  路  3Comments

ituhin picture ituhin  路  3Comments

bbusche picture bbusche  路  5Comments