DEV Community

Discussion on: My Docker Setup For GatsbyJS (and NextJS)

Collapse
 
miksdigital profile image
Mikhail

Hi Daniel!
Thanks for sharing!

I just copy-pasted all two files , run docker-compose -up build
and got the error:

Step 6/9 : COPY ./package.json .
ERROR: Service 'web' failed to build: COPY failed: stat /var/snap/docker/common/var-lib-docker/tmp/docker-builder603792599/package.json: no such file or directory

After this message installation stopped.

May be you have an idea how to fix?

Collapse
 
stoutlabs profile image
Daniel Stout

Based on that error, it looks like there was no package.json file found.

Do you have the Dockerfile and docker-compose.yml files in the root of your Gatsby project directory?