Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR [build 2/1] ADD public/ /pub #46

Open
Loschcode opened this issue Jan 16, 2021 · 3 comments
Open

ERROR [build 2/1] ADD public/ /pub #46

Loschcode opened this issue Jan 16, 2021 · 3 comments

Comments

@Loschcode
Copy link

First time using gatsby-docker it just crashes by following your readme. What am I missing here?

[+] Building 3.0s (9/10)
 => [internal] load build definition from Dockerfile                                                                                                                                                                    0.0s
 => => transferring dockerfile: 527B                                                                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                                       0.0s
 => => transferring context: 34B                                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/gatsbyjs/gatsby:latest                                                                                                                                                       2.9s
 => [internal] load metadata for docker.io/gatsbyjs/gatsby:onbuild                                                                                                                                                      2.8s
 => [auth] gatsbyjs/gatsby:pull token for registry-1.docker.io                                                                                                                                                          0.0s
 => [stage-1 1/2] FROM docker.io/gatsbyjs/gatsby@sha256:fa8b71211a1ae2d3a3f53c1a8c73cd6aa563b02e5c7d2e70975fed65e55af712                                                                                                0.0s
 => => resolve docker.io/gatsbyjs/gatsby@sha256:fa8b71211a1ae2d3a3f53c1a8c73cd6aa563b02e5c7d2e70975fed65e55af712                                                                                                        0.0s
 => [internal] load build context                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                         0.0s
 => CANCELED [build 1/1] FROM docker.io/gatsbyjs/gatsby:onbuild@sha256:cc6f390975708bee5b4dc9a2a4812b8e8bfb2ded1bb5c3107be91150e97ccb50                                                                                 0.0s
 => => resolve docker.io/gatsbyjs/gatsby:onbuild@sha256:cc6f390975708bee5b4dc9a2a4812b8e8bfb2ded1bb5c3107be91150e97ccb50                                                                                                0.0s
 => => sha256:cc6f390975708bee5b4dc9a2a4812b8e8bfb2ded1bb5c3107be91150e97ccb50 947B / 947B                                                                                                                              0.0s
 => => sha256:d584dc12fdde1770d771137dfecff12d53ae522fadd6ae7915c08864d6401dd7 3.32kB / 3.32kB                                                                                                                          0.0s
 => ERROR [build 2/1] ADD public/ /pub``
`
@rdunb
Copy link

rdunb commented Feb 1, 2021

I was able to get it working by replacing

COPY --from=build /app/public /pub

with

COPY --from=build /pub /pub

I just dug through the content of the generated onbuild container and saw that there was no /app/public folder but there was a /pub folder with all my gatsby site files in it. Not sure if this is the right answer but it appears to be working for me.

@getrembl
Copy link

image
I think the problem comes from here, there is a difference between the image in the docker hub and the Dockerfile on the git repo.

@maikxmh
Copy link

maikxmh commented Apr 12, 2022

seems like the docker image is 2 years old - are there any updates planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants