What does “copy . .” mean? Thank you.
The
COPY
instruction copies new files or directories from<src>
and adds them to the filesystem of the container at the path<dest>
Also
The
<dest>
is an absolute path, or a path relative toWORKDIR
@terpz “COPY . .” Please explain me!
What is happening in Line 11? Aren’t SRC and DEST the same?
Capture|690x327
Hi @jayjani008
It means the same thing yes, the dot is “where i am now”
So it will copy everything from the same place as the dockerfile, to “where i am now” in the container.
The “where i am now” in the image/container is defined by https://docs.docker.com/engine/reference/builder/#workdir
So if you set:
WORKDIR /tmp
and do
COPY . .
It will copy everything in the current folder, to /tmp
Hope that makes sense