forked from stacksimplify/docker-fundamentals
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kalyan Reddy Daida
authored and
Kalyan Reddy Daida
committed
Dec 4, 2019
1 parent
14bfeff
commit 6c61752
Showing
14 changed files
with
143 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Docker Fundamental Flows | ||
|
||
## 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 | ||
- Access the URL http://localhost | ||
``` | ||
docker run --name mynginxdefault -p 80:80 -d nginx | ||
docker ps | ||
``` | ||
|
||
- Create Dockerfile and copy our customized index.html | ||
``` | ||
FROM nginx | ||
COPY index.html /usr/share/nginx/html | ||
``` | ||
- 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 | ||
``` | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM nginx | ||
COPY index.html /usr/share/nginx/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Kalyan Reddy V1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2965c5cc9d1b | ||
4a51be64e1ee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
kalyandev/springboot-helloworld-rest-api:1.0.0-RELEASE | ||
stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
kalyandev/springboot-helloworld-rest-api | ||
stacksimplify/dockerintro-springboot-helloworld-rest-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...target/surefire-reports/com.stacksimplify.restservices.UserManagementApplicationTests.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
------------------------------------------------------------------------------- | ||
Test set: com.stacksimplify.restservices.UserManagementApplicationTests | ||
------------------------------------------------------------------------------- | ||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in com.stacksimplify.restservices.UserManagementApplicationTests | ||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in com.stacksimplify.restservices.UserManagementApplicationTests |
2 changes: 1 addition & 1 deletion
2
...api/target/test-classes/META-INF/docker/com.stacksimplify/01-helloworld-rest-api/image-id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2965c5cc9d1b | ||
4a51be64e1ee |
2 changes: 1 addition & 1 deletion
2
...i/target/test-classes/META-INF/docker/com.stacksimplify/01-helloworld-rest-api/image-name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
kalyandev/springboot-helloworld-rest-api:1.0.0-RELEASE | ||
stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE |
2 changes: 1 addition & 1 deletion
2
...i/target/test-classes/META-INF/docker/com.stacksimplify/01-helloworld-rest-api/repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
kalyandev/springboot-helloworld-rest-api | ||
stacksimplify/dockerintro-springboot-helloworld-rest-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
# Docker Commands | ||
|
||
## Images | ||
- build | ||
- images | ||
- history | ||
- load | ||
- pull | ||
- push | ||
- rmi | ||
- save | ||
- search | ||
- tag | ||
- commit | ||
|
||
## Containers | ||
- run | ||
- start | ||
- stop | ||
- kill | ||
- cp | ||
- create | ||
- exec | ||
- export | ||
- import | ||
- logs | ||
- pause | ||
- unpause | ||
- port | ||
- ps | ||
- update | ||
- rename | ||
- restart | ||
- stats | ||
- top | ||
- rm | ||
- attach | ||
- diff | ||
- waot | ||
|
||
## Other Commands | ||
- version | ||
- login | ||
- logout | ||
- events | ||
- info | ||
- inspet | ||
|
||
## Order of execution | ||
- docker version | ||
- docker pull | ||
- docker run | ||
- docker ps | ||
- docker ps -a | ||
- docker exec | ||
- docker stop | ||
- docker kill | ||
- docker commit | ||
- docker login | ||
- docker push | ||
- docker images | ||
- docker rm | ||
- docker rmi | ||
- docker build | ||
|
||
## Flow -1 | ||
- docker version | ||
- docker login | ||
- docker pull | ||
- docker run | ||
- docker ps | ||
- docker ps -a | ||
- docker exec | ||
- docker stop | ||
- docker kill | ||
|
||
``` | ||
docker version | ||
docker login -u stacksimplify -p <password> | ||
docker pull stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE | ||
docker images | ||
docker run -p 80:8080 -d stacksimplify/dockerintro-springboot-helloworld-rest-api:1.0.0-RELEASE | ||
http://localhost/hello | ||
docker ps, docker ps -a, docker ps -a -q | ||
docker exec -it pensive_pascal /bin/sh | ||
docker stop pensive_pascal | ||
docker start pensive_pascal | ||
docker kill pensive_pascal | ||
docker rm pensive_pascal | ||
docker rmi | ||
``` | ||
|
||
|
||
|
||
|