# What does "copy . ." mean?

**URL:** <https://forums.docker.com/t/what-does-copy-mean/74121>\
**Category:** Docker Hub\
**Created:** [May 2, 2019, 5:59am UTC](https://forums.docker.com/t/what-does-copy-mean/74121 "2019-05-02T05:59:58Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![whitz](https://avatars.discourse-cdn.com/v4/letter/w/6bbea6/32.png) [@whitz](https://forums.docker.com/u/whitz)\
**Post date:** [May 2, 2019, 5:59am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/1 "2019-05-02T05:59:58Z")

</div>

What does “copy . .” mean? Thank you.

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [May 2, 2019, 7:43am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/2 "2019-05-02T07:43:21Z")

</div>

> 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 to `WORKDIR`

> **[Dockerfile reference](https://docs.docker.com/engine/reference/builder/#copy)**
>
> Find all the available commands you can use in a Dockerfile and learn how to use them, including COPY, ARG, ENTRYPOINT, and more.

---

<div class="post-metadata">

**Author:** ![jayjani008](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/jayjani008/32/22857_2.png) [@jayjani008](https://forums.docker.com/u/jayjani008)\
**Post date:** [January 12, 2021, 4:44am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/3 "2021-01-12T04:44:42Z")

</div>

@terpz “COPY . .” Please explain me!  
What is happening in Line 11? Aren’t SRC and DEST the same?  
[Capture|690x327](https://forums.docker.com/uploads/short-url/iBKifXsGMtX97mPzxMjiL8P6hus.jpeg)

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [January 12, 2021, 8:43am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/4 "2021-01-12T08:43:07Z")

</div>

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](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 🙂

---

<div class="post-metadata">

**Author:** ![sasidhar6696](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sasidhar6696](https://forums.docker.com/u/sasidhar6696)\
**Post date:** [January 24, 2021, 8:58pm UTC](https://forums.docker.com/t/what-does-copy-mean/74121/5 "2021-01-24T20:58:52Z")

</div>

what does .e mean in COPY --from=builder /out/ .e

the complete docker file is below…

FROM [mcr.microsoft.com/dotnet/core/sdk:3.0.100-preview9](http://mcr.microsoft.com/dotnet/core/sdk:3.0.100-preview9) AS builder

WORKDIR /src  
COPY src/DotNetConf2019.csproj .  
RUN dotnet restore

COPY src/ .  
RUN dotnet publish -c Release -o /out DotNetConf2019.csproj

# app image

FROM [mcr.microsoft.com/dotnet/core/runtime:3.0.0-preview9](http://mcr.microsoft.com/dotnet/core/runtime:3.0.0-preview9)

WORKDIR /app  
ENTRYPOINT ["/bin/sh"]  
ENV DotNetBot:Message=“docker4theEdge!”

COPY --from=builder /out/ .e

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [January 25, 2021, 7:04am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/6 "2021-01-25T07:04:19Z")

</div>

@sasidhar6696, im not sure why you would do it, but in that way a folder in WORKDIR (/app) will be created, named “.e”, fullpath: /app/.e

---

<div class="post-metadata">

**Author:** ![sasidhar6696](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@sasidhar6696](https://forums.docker.com/u/sasidhar6696)\
**Post date:** [January 25, 2021, 9:42am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/7 "2021-01-25T09:42:29Z")

</div>

@terpz  
Thanks for the reply . I am new to docker, This is one of the practice examples at [https://github.com/dockersamples/dotnetconf19](https://github.com/dockersamples/dotnetconf19)  
I am pretty much sure its not creating a directory .e under /app, when I logged into container’s terminal, there isn’t “/app/.e”!!

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [January 25, 2021, 10:17am UTC](https://forums.docker.com/t/what-does-copy-mean/74121/8 "2021-01-25T10:17:03Z")

</div>

How do you check?  
remember its a dot file (hidden) so either cd /app/.e or ls -la /app

else I have no idea

---

<div class="post-metadata">

**Author:** ![aimetoure](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@aimetoure](https://forums.docker.com/u/aimetoure)\
**Post date:** [April 8, 2021, 9:16pm UTC](https://forums.docker.com/t/what-does-copy-mean/74121/9 "2021-04-08T21:16:51Z")

</div>

Hello. Do you speak English?

---

<div class="post-metadata">

**Author:** ![hiteshsahu](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/hiteshsahu/32/37888_2.png) [@hiteshsahu](https://forums.docker.com/u/hiteshsahu)\
**Post date:** [December 10, 2022, 2:26pm UTC](https://forums.docker.com/t/what-does-copy-mean/74121/10 "2022-12-10T14:26:01Z")

</div>

Dopy command: _ **COPY src dest** _ copies files from a local source location to the destination in the Docker container. So _ **COPY. .** _ command copies everything from the root directory of the Dockerfile to the container.
