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 14bfeff commit 6c61752
Show file tree
Hide file tree
Showing 14 changed files with 143 additions and 13 deletions.
29 changes: 29 additions & 0 deletions 00-Docker-Fundamentals/01-Docker-Fundamental-Flows.md
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
2 changes: 2 additions & 0 deletions 00-Docker-Fundamentals/Nginx-DockerFiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM nginx
COPY index.html /usr/share/nginx/html
1 change: 1 addition & 0 deletions 00-Docker-Fundamentals/Nginx-DockerFiles/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kalyan Reddy V1
3 changes: 3 additions & 0 deletions 01-helloworld-rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,6 @@ docker ps
- /Users/<userid>/.docker/config.json
- ~/.docker/config.json
- Remove the line **“credSstore” : “osxkeychain”,** in config.json



4 changes: 2 additions & 2 deletions 01-helloworld-rest-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>com.stacksimplify</groupId>
<artifactId>01-helloworld-rest-api</artifactId>
<name>springboot-helloworld-rest-api</name>
<name>dockerintro-springboot-helloworld-rest-api</name>
<version>1.0.0-RELEASE</version>
<description>Hello World REST Api</description>
<packaging>jar</packaging>
Expand Down Expand Up @@ -65,7 +65,7 @@
</execution>
</executions>
<configuration>
<repository>kalyandev/${project.name}</repository>
<repository>stacksimplify/${project.name}</repository>
<tag>${project.version}</tag>
<skipDockerInfo>true</skipDockerInfo>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion 01-helloworld-rest-api/target/docker/image-id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2965c5cc9d1b
4a51be64e1ee
2 changes: 1 addition & 1 deletion 01-helloworld-rest-api/target/docker/image-name
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 01-helloworld-rest-api/target/docker/repository
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kalyandev/springboot-helloworld-rest-api
stacksimplify/dockerintro-springboot-helloworld-rest-api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.stacksimplify.restservices.UserManagementApplicationTests" time="0.002" tests="1" errors="0" skipped="0" failures="0">
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="com.stacksimplify.restservices.UserManagementApplicationTests" time="0.003" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
Expand All @@ -17,7 +17,7 @@
<property name="user.country" value="IN"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib"/>
<property name="sun.java.command" value="/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire/surefirebooter6997849114489058139.jar /Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire 2019-11-20T19-30-17_732-jvmRun1 surefire8246191104093248174tmp surefire_04973334961246326229tmp"/>
<property name="sun.java.command" value="/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire/surefirebooter3438917815826939092.jar /Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire 2019-11-23T15-49-32_506-jvmRun1 surefire6387885204283275497tmp surefire_01875394488665455977tmp"/>
<property name="http.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
<property name="surefire.test.class.path" value="/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/test-classes:/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/classes:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.2.1.RELEASE/spring-boot-starter-web-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter/2.2.1.RELEASE/spring-boot-starter-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.2.1.RELEASE/spring-boot-starter-logging-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/kdaida/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/kdaida/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar:/Users/kdaida/.m2/repository/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar:/Users/kdaida/.m2/repository/org/slf4j/jul-to-slf4j/1.7.29/jul-to-slf4j-1.7.29.jar:/Users/kdaida/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/kdaida/.m2/repository/org/yaml/snakeyaml/1.25/snakeyaml-1.25.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.2.1.RELEASE/spring-boot-starter-json-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.0/jackson-datatype-jdk8-2.10.0.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.0/jackson-datatype-jsr310-2.10.0.jar:/Users/kdaida/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.0/jackson-module-parameter-names-2.10.0.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.2.1.RELEASE/spring-boot-starter-tomcat-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.27/tomcat-embed-core-9.0.27.jar:/Users/kdaida/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.27/tomcat-embed-el-9.0.27.jar:/Users/kdaida/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.27/tomcat-embed-websocket-9.0.27.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.2.1.RELEASE/spring-boot-starter-validation-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.1/jakarta.validation-api-2.0.1.jar:/Users/kdaida/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.18.Final/hibernate-validator-6.0.18.Final.jar:/Users/kdaida/.m2/repository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar:/Users/kdaida/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/kdaida/.m2/repository/org/springframework/spring-web/5.2.1.RELEASE/spring-web-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-webmvc/5.2.1.RELEASE/spring-webmvc-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-aop/5.2.1.RELEASE/spring-aop-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-expression/5.2.1.RELEASE/spring-expression-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-context-support/5.2.1.RELEASE/spring-context-support-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-beans/5.2.1.RELEASE/spring-beans-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-context/5.2.1.RELEASE/spring-context-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-core/5.2.1.RELEASE/spring-core-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/spring-jcl/5.2.1.RELEASE/spring-jcl-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-starter-test/2.2.1.RELEASE/spring-boot-starter-test-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-test/2.2.1.RELEASE/spring-boot-test-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-test-autoconfigure/2.2.1.RELEASE/spring-boot-test-autoconfigure-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/com/jayway/jsonpath/json-path/2.4.0/json-path-2.4.0.jar:/Users/kdaida/.m2/repository/net/minidev/json-smart/2.3/json-smart-2.3.jar:/Users/kdaida/.m2/repository/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar:/Users/kdaida/.m2/repository/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar:/Users/kdaida/.m2/repository/org/slf4j/slf4j-api/1.7.29/slf4j-api-1.7.29.jar:/Users/kdaida/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar:/Users/kdaida/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/Users/kdaida/.m2/repository/org/junit/jupiter/junit-jupiter/5.5.2/junit-jupiter-5.5.2.jar:/Users/kdaida/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.5.2/junit-jupiter-api-5.5.2.jar:/Users/kdaida/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/kdaida/.m2/repository/org/junit/platform/junit-platform-commons/1.5.2/junit-platform-commons-1.5.2.jar:/Users/kdaida/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.5.2/junit-jupiter-params-5.5.2.jar:/Users/kdaida/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.5.2/junit-jupiter-engine-5.5.2.jar:/Users/kdaida/.m2/repository/org/junit/vintage/junit-vintage-engine/5.5.2/junit-vintage-engine-5.5.2.jar:/Users/kdaida/.m2/repository/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/Users/kdaida/.m2/repository/org/junit/platform/junit-platform-engine/1.5.2/junit-platform-engine-1.5.2.jar:/Users/kdaida/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/kdaida/.m2/repository/org/mockito/mockito-junit-jupiter/3.1.0/mockito-junit-jupiter-3.1.0.jar:/Users/kdaida/.m2/repository/org/assertj/assertj-core/3.13.2/assertj-core-3.13.2.jar:/Users/kdaida/.m2/repository/org/hamcrest/hamcrest/2.1/hamcrest-2.1.jar:/Users/kdaida/.m2/repository/org/mockito/mockito-core/3.1.0/mockito-core-3.1.0.jar:/Users/kdaida/.m2/repository/net/bytebuddy/byte-buddy/1.10.2/byte-buddy-1.10.2.jar:/Users/kdaida/.m2/repository/net/bytebuddy/byte-buddy-agent/1.10.2/byte-buddy-agent-1.10.2.jar:/Users/kdaida/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar:/Users/kdaida/.m2/repository/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/Users/kdaida/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/Users/kdaida/.m2/repository/org/springframework/spring-test/5.2.1.RELEASE/spring-test-5.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/xmlunit/xmlunit-core/2.6.3/xmlunit-core-2.6.3.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-devtools/2.2.1.RELEASE/spring-boot-devtools-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot/2.2.1.RELEASE/spring-boot-2.2.1.RELEASE.jar:/Users/kdaida/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.2.1.RELEASE/spring-boot-autoconfigure-2.2.1.RELEASE.jar:"/>
<property name="sun.cpu.endian" value="little"/>
Expand All @@ -31,7 +31,7 @@
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire/surefirebooter6997849114489058139.jar"/>
<property name="surefire.real.class.path" value="/Users/kdaida/Documents/Courses-Main/course-projects/aws-fargate-ecs-masterclass/01-helloworld-rest-api/target/surefire/surefirebooter3438917815826939092.jar"/>
<property name="sun.boot.class.path" value="/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home/jre/classes"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="ftp.nonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
Expand Down Expand Up @@ -61,5 +61,5 @@
<property name="java.class.version" value="52.0"/>
<property name="socksNonProxyHosts" value="local|*.local|169.254/16|*.169.254/16"/>
</properties>
<testcase name="contextLoads" classname="com.stacksimplify.restservices.UserManagementApplicationTests" time="0"/>
<testcase name="contextLoads" classname="com.stacksimplify.restservices.UserManagementApplicationTests" time="0.001"/>
</testsuite>
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2965c5cc9d1b
4a51be64e1ee
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
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kalyandev/springboot-helloworld-rest-api
stacksimplify/dockerintro-springboot-helloworld-rest-api
95 changes: 95 additions & 0 deletions docker-commands.md
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
```




0 comments on commit 6c61752

Please sign in to comment.