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 Feb 15, 2020
1 parent dce1ff5 commit 2732243
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 101 deletions.
11 changes: 6 additions & 5 deletions 01-Docker-Introduction/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Docker Introduction

## What is Docker?

## Why do we need to use Docker?

## What are advantages of using Docker?
## Docker Introduction
- What problems we have with Traditional Infra?
- Why do we need to use Docker?
- What are advantages of using Docker?
- What is Docker?
- Lets have couple of hands-on exercises to understand what is Docker.

8 changes: 7 additions & 1 deletion 02-Docker-Installation/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Docker Installation

## Docker Installations
- https://docs.docker.com/install/

## Docker Desktop on Windows
- https://docs.docker.com/docker-for-windows/

## Docker Desktop on MAC
- https://docs.docker.com/docker-for-mac/

## Docker Desktop on Windows
49 changes: 9 additions & 40 deletions 03-Pull-from-DockerHub-and-Run-Docker-Images/README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,48 @@
# Docker Fundamental Flows
# Flow-1: Pull Docker Image from Docker Hub and Run it

## Flow-1: Pull existing Docker Image from Docker Hub and Run it as a Container

#### Step-1: Verify Docker version and also login to Docker Hub
## Step-1: Verify Docker version and also login to Docker Hub
```
docker version
docker login
```

#### Step-2: Pull Image from Docker Hub
## Step-2: Pull Image from Docker Hub
```
docker pull stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
```

#### Step-3: Run the downloaded Docker Image & Access the Application
## Step-3: Run the downloaded Docker Image & Access the Application
- Copy the docker image name from Docker Hub
```
docker run --name app1 -p 80:8080 -d stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
http://localhost/hello
```

#### Step-4: List Running Containers
## Step-4: List Running Containers
```
docker ps
docker ps -a
docker ps -a -q
```

#### Step-5: Connect to Container Terminal
## Step-5: Connect to Container Terminal
```
docker exec -it <container-name> /bin/sh
```

#### Step-6: Container Stop, Start
## Step-6: Container Stop, Start
```
docker stop <container-name>
docker start <container-name>
```

#### Step-7: Remove Container
## Step-7: Remove Container
```
docker rm <container-name>
```

### Step-8: Remove Image
## Step-8: Remove Image
```
docker image <image-id>
```

## Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub
#### 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
```
FROM nginx
COPY index.html /usr/share/nginx/html
```

#### 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
```
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
- Login to docker hub
- Url: https://hub.docker.com/repositories
61 changes: 6 additions & 55 deletions 04-Build-new-Docker-Image-and-run/README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,30 @@
# Docker Fundamental Flows
# Flow-2: Create a new Docker Image, Run as Container and Push to Docker Hub

## Flow-1: Pull existing Docker Image from Docker Hub and Run it as a Container

#### Step-1: Verify Docker version and also login to Docker Hub
```
docker version
docker login
```

#### Step-2: Pull Image from Docker Hub
```
docker pull stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
```

#### Step-3: Run the downloaded Docker Image & Access the Application
- Copy the docker image name from Docker Hub
```
docker run --name app1 -p 80:8080 -d stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE
http://localhost/hello
```

#### Step-4: List Running Containers
```
docker ps
docker ps -a
docker ps -a -q
```

#### Step-5: Connect to Container Terminal
```
docker exec -it <container-name> /bin/sh
```

#### Step-6: Container Stop, Start
```
docker stop <container-name>
docker start <container-name>
```

#### Step-7: Remove Container
```
docker rm <container-name>
```

### Step-8: Remove Image
```
docker image <image-id>
```

## 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 2732243

Please sign in to comment.