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 d4214b0 commit dce1ff5
Show file tree
Hide file tree
Showing 68 changed files with 92 additions and 240 deletions.
8 changes: 8 additions & 0 deletions 01-Docker-Introduction/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Docker Introduction

## What is Docker?

## Why do we need to use Docker?

## What are advantages of using Docker?

55 changes: 0 additions & 55 deletions 01-helloworld-rest-api/.classpath

This file was deleted.

Binary file not shown.

This file was deleted.

28 changes: 0 additions & 28 deletions 01-helloworld-rest-api/.project

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions 01-helloworld-rest-api/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions 01-helloworld-rest-api/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

This file was deleted.

Binary file removed 01-helloworld-rest-api/src/.DS_Store
Binary file not shown.
Binary file removed 01-helloworld-rest-api/src/main/.DS_Store
Binary file not shown.
Binary file removed 01-helloworld-rest-api/src/main/java/.DS_Store
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 0 additions & 5 deletions 01-helloworld-rest-api/target/classes/application.properties

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 0 additions & 11 deletions 01-helloworld-rest-api/target/classes/static/error403.html

This file was deleted.

10 changes: 0 additions & 10 deletions 01-helloworld-rest-api/target/classes/static/error404.html

This file was deleted.

11 changes: 0 additions & 11 deletions 01-helloworld-rest-api/target/classes/static/error500.html

This file was deleted.

1 change: 0 additions & 1 deletion 01-helloworld-rest-api/target/docker/image-id

This file was deleted.

1 change: 0 additions & 1 deletion 01-helloworld-rest-api/target/docker/image-name

This file was deleted.

1 change: 0 additions & 1 deletion 01-helloworld-rest-api/target/docker/repository

This file was deleted.

1 change: 0 additions & 1 deletion 01-helloworld-rest-api/target/docker/tag

This file was deleted.

3 changes: 0 additions & 3 deletions 01-helloworld-rest-api/target/maven-archiver/pom.properties

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
5 changes: 5 additions & 0 deletions 02-Docker-Installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Docker Installation

## Docker Desktop on MAC

## Docker Desktop on Windows
File renamed without changes.
79 changes: 79 additions & 0 deletions 04-Build-new-Docker-Image-and-run/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Docker Fundamental Flows

## 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
- 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
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dce1ff5

Please sign in to comment.