# Lab 2: Create an image with ADD instruction

### Creating Dockerfile <a href="#creating-dockerfile" id="creating-dockerfile"></a>

```
FROM alpine:3.5
RUN apk update
ADD http://www.vlsitechnology.org/pharosc_8.4.tar.gz .
```

### Build Docker Image <a href="#build-docker-image" id="build-docker-image"></a>

```
docker build -t microfocus/alpine-add . -f <name of dockerfile>
```

### Tagging image as labs-git <a href="#tagging-image-as-labs-git" id="tagging-image-as-labs-git"></a>

```
docker tag microfocus/alpine-add microfocus/labs-add:v1.0
```

### Verify the Images <a href="#verify-the-images" id="verify-the-images"></a>

```
docker images
```

### Create a container <a href="#create-a-container" id="create-a-container"></a>

```
docker run -itd microfocus/labs-add:v1.0 /bin/sh
```

```
docker ps
```

### Enter into Container Shell <a href="#enter-into-container-shell" id="enter-into-container-shell"></a>

```
docker attach <<ContainerID>>
```

Please press “Enter” key twice so as to enter into container shell

### Verify if the link has been extracted onto the container <a href="#verify-if-the-link-has-been-extracted-onto-the-container" id="verify-if-the-link-has-been-extracted-onto-the-container"></a>

```
ls -ltr
```

ADD Command lets you to add a tar directly from a link and explode to the container.
