L
L
letema2018-09-29 17:01:46
Docker
letema, 2018-09-29 17:01:46

How does COPY work in DOCKERFILE?

Good afternoon. I have a dockerker project file located in the project's env folder. How to copy the file from the project root to this directory.
This is how the command is written COPY ~/.env.dist /env/
Here is the error: Service 'app' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder456578354/~/.env.dist: no such file or directory.
Why is he looking for him there? and what command should be for him to take the file from the root of the project

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene Pedya, 2018-09-30
@fpinger

COPY readme.txt /usr/src/test
readme.txt - file in current folder along with Dockerfile

L
letema, 2018-09-30
@letema

Thanks I got it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question