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 ba2f79e commit 18b6fe5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions 00-Docker-Fundamentals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +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
### 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
```

### 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
```
- 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
```
- 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
```
- 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 18b6fe5

Please sign in to comment.