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

Dockerfile in unusual place #30

Open
robmarkcole opened this issue Apr 7, 2022 · 2 comments
Open

Dockerfile in unusual place #30

robmarkcole opened this issue Apr 7, 2022 · 2 comments

Comments

@robmarkcole
Copy link

Hi, if I follow the docker build instructions from within the deploy directory I will get error:

[+] Building 2.1s (8/9)                                                                              
 => [internal] load build definition from Dockerfile                                            0.0s
 => => transferring dockerfile: 1.89kB                                                          0.0s
 => [internal] load .dockerignore                                                               0.0s
 => => transferring context: 2B                                                                 0.0s
 => [internal] load metadata for docker.io/continuumio/miniconda3:latest                        1.9s
 => [auth] continuumio/miniconda3:pull token for registry-1.docker.io                           0.0s
 => CANCELED [1/5] FROM docker.io/continuumio/miniconda3@sha256:569836b3f93ef06df731b3a917e58c  0.1s
 => => resolve docker.io/continuumio/miniconda3@sha256:569836b3f93ef06df731b3a917e58cc65c54f4b  0.0s
 => => sha256:4d529c886124409ea8f150a4db1a2221a3ccda86fe5d6f4d555eee7ef7285645 4.08kB / 4.08kB  0.0s
 => => sha256:569836b3f93ef06df731b3a917e58cc65c54f4ba87524f98c4753f99d5654026 1.36kB / 1.36kB  0.0s
 => => sha256:1283ad2e67cd483de5123cefb25767a04521c48160da6099965e306224adfd54 953B / 953B      0.0s
 => [internal] load build context                                                               0.1s
 => => transferring context: 2.34kB                                                             0.1s
 => CACHED [2/5] COPY ./ ./                                                                     0.0s
 => ERROR [3/5] COPY environment/dashdoodler-clean.yml .                                        0.0s
------
 > [3/5] COPY environment/dashdoodler-clean.yml .:
------
failed to compute cache key: "/environment/dashdoodler-clean.yml" not found: not found

It is necessary to copy the Dockerfile to the root directory, which is where I would usually expect to find it. I would also recommend users to use the docker-compose

@dbuscombe-usgs
Copy link
Member

Thanks for the comment. You are correct that the Dockerfile is just for illustration, and not in the correct place. These docker workflows have not been used in production.

In truth, I have no actual experience with Docker (I find it difficult, and it has been on my to-do list for years), so I would welcome any recipes you develop, including those using docker-compose. Thanks!

@robmarkcole
Copy link
Author

I live in my own world of docker pain since I use an M1 Mac, and recall this gave me some issues. Will update here if I get back to it :)

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

2 participants