Skip to content

Commit e9be578

Browse files
authored
Update Lab-2-Create-an-image-with-ADD-instruction.md
1 parent fcf94f3 commit e9be578

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

beginners/dockerfile/Lab-2-Create-an-image-with-ADD-instruction.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Lab #2: Create an image with ADD instruction
22

3+
COPY and ADD are both Dockerfile instructions that serve similar purposes. They let you copy files from a specific location into a Docker image.
4+
5+
COPY takes in a src and destination. It only lets you copy in a local file or directory from your host (the machine building the Docker image) into the Docker image itself.
6+
7+
ADD lets you do that too, but it also supports 2 other sources. First, you can use a URL instead of a local file / directory. Secondly, you can extract a tar file from the source directly into the destination.
8+
39
## Pre-requisite:
410

511
## Tested Infrastructure
@@ -93,6 +99,7 @@ Please press "Enter" key twice so as to enter into container shell
9399
```
94100

95101
ADD Command lets you to add a tar directly from a link and explode to the container.
102+
96103
## Contributor - [Saiyam Pathak](https://www.linkedin.com/in/saiyam-pathak-97685a64/)
97104

98105
[Lab #3: Create a Docker image with COPY instruction](https://dockerlabs.collabnix.com//beginners/dockerfile/lab4_dockerfile_copy.html)

0 commit comments

Comments
 (0)