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

Why docker build error on copy? #384

Closed
hooman-mirghasemi opened this issue Jun 9, 2021 · 1 comment
Closed

Why docker build error on copy? #384

hooman-mirghasemi opened this issue Jun 9, 2021 · 1 comment

Comments

@hooman-mirghasemi
Copy link

My docker file:
FROM wyveo/nginx-php-fpm:php73 COPY test.txt .

when run
docker build - < Dockerfile -t nnn

see this error:
`
failed to get console mode for stdin: The handle is invalid.
[+] Building 0.1s (7/7) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 634B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/wyveo/nginx-php-fpm:php73 0.0s
=> [1/3] FROM docker.io/wyveo/nginx-php-fpm:php73 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [2/3] WORKDIR /etc/nginx 0.0s
=> ERROR [3/3] COPY test.txt . 0.0s

[3/3] COPY test.txt .:


failed to compute cache key: "/test.txt" not found: not found
`

@hooman-mirghasemi
Copy link
Author

finaly i found solution here:
https://serverfault.com/questions/666149/docker-copy-issue-no-such-file-or-directory

Note:

docker build - < Dockerfile does not have any context.

Hence use,

docker build .

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

1 participant