Skip to content

Commit

Permalink
Welcome to Stack Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalyan Reddy Daida authored and Kalyan Reddy Daida committed Dec 4, 2019
1 parent 18b6fe5 commit 8f93c6c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions 00-Docker-Fundamentals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@
## Flow-1: Pull existing Docker Image from Docker Hub and Run it as a Container

## Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub
### Step-1: Run the base Nginx container
#### Step-1: Run the base Nginx container
- Access the URL http://localhost
```
docker run --name mynginxdefault -p 80:80 -d nginx
docker ps
```

### Step-2: Create Dockerfile and copy our customized index.html
#### Step-2: Create Dockerfile and copy our customized index.html
```
FROM nginx
COPY index.html /usr/share/nginx/html
```

### Step-3: Build Docker Image & run it
#### Step-3: Build Docker Image & run it
```
docker build -t stacksimplify/mynginx_image1:v1 .
docker run --name mynginx1 -p 80:80 -d stacksimplify/mynginx_image1:v1
```

### Step-4: Tag & push the Docker image to docker hub
#### Step-4: Tag & push the Docker image to docker hub
```
docker images
docker tag stacksimplify/mynginx_image1:v1 stacksimplify/mynginx_image1:v1-release
docker push stacksimplify/mynginx_image1:v1-release
```
### Step-5: Verify the same on docker hub
#### Step-5: Verify the same on docker hub
- Login to docker hub
- Url: https://hub.docker.com/repositories

0 comments on commit 8f93c6c

Please sign in to comment.