Skip to content

Commit f950c2d

Browse files
Ranga KaranamRanga Karanam
authored andcommitted
Thank You for Choosing to Learn from in28Minutes
1 parent f2df070 commit f950c2d

14 files changed

+13
-14
lines changed

_posts/2020-03-14-Docker.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Are you ready to jump into the world of Docker?
4747
Docker is popular because of the possibilites it opens for software delivery and deployment. Many common problems and inefficiences are resolved with containers.
4848

4949
The awesome thing about Docker is, you can easily install Docker on Cloud. Most of the cloud providers provide container based services
50-
![alt text](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section02-getting-started-with-docker/resources/02-getting-started-with-docker-step06-001.png)
5150

5251
They provide services where you just need to provide a docker Image and it would automatically run on the cloud.
5352

@@ -56,13 +55,13 @@ They provide services where you just need to provide a docker Image and it would
5655
Before Docker, virutal machines were very popular.
5756

5857
The image below shows the typical architecture with a Virtual Machine
59-
![alt text](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section02-getting-started-with-docker/resources/02-getting-started-with-docker-step06-002.png)
58+
![alt text](images/vm-architecture.png)
6059

6160
As you can see there are two operating systems present one is Guest OS and another is Host OS.
6261

6362
Due to this, virutal machine architecture becomes heavyweight. Hence you will not be able to benefit from the entire power of your hardware because of virutalization.
6463

65-
![alt text](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section02-getting-started-with-docker/resources/02-getting-started-with-docker-step06-003.png)
64+
![alt text](images/docker-vs-VM-02.png)
6665

6766
With Docker, all that you need to run containers is a Docker Engine. Other main reasons why Docker is popular is:
6867

@@ -88,7 +87,7 @@ The rise of microservice architecture also one of the reason for Docker populari
8887

8988
Docker uses a client-server architecture. The Docker client talks to the Docker `daemon`, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface.
9089

91-
![Docker Architecture](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section02-getting-started-with-docker/resources/02-getting-started-with-docker-step05-001.png)
90+
![Docker Architecture](images/docker-architecture.png)
9291

9392
#### Docker daemon
9493

@@ -142,7 +141,7 @@ You can clone or download the entire github repository and import this project a
142141

143142
Here is the screenshot of the project setup in Eclipse.
144143

145-
![alt text](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step01-001.png)
144+
![alt text](images/04-containerizing-java-spring-boot-hello-world-rest-api-step01-001.png)
146145

147146
If you are new to Spring and Spring Boot, you can watch these - [Spring in 10 Steps](https://courses.in28minutes.com/p/spring-framework-for-beginners) and [Spring Boot in 10 Steps](https://courses.in28minutes.com/p/spring-boot-for-beginners-in-10-steps) to understand how Spring and Spring Boot work together.
148147

@@ -174,8 +173,8 @@ Building a JAR file should be really easy. All that you need to is do a clean Ma
174173

175174
This would compile the code, run the unit tests, and finally, a JAR would be packaged.
176175

177-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-003.png)
178-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-004.png)
176+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-003.png)
177+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-004.png)
179178

180179
The name of the JAR is ```hello-world-rest-api.jar```, and it is under the ```target``` folder.
181180

@@ -215,7 +214,7 @@ Let's now run the alpine jdk image.
215214
```openjdk:8-jdk-alpine``` image will be dowloaded from Docker Hub. It would take a little while as it is a large - ```100 MB``` download.
216215

217216
You can run `docker images` to see the downloaded image.
218-
![alt text](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-007.png)
217+
![alt text](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-007.png)
219218

220219
Run ```docker container ls``` to see the running container - ```naughty_knuth```.
221220

@@ -228,9 +227,9 @@ The third step is to copy the JAR into the specific image. Then, we would want t
228227
Here's the command to copy a jar file into the container:
229228

230229
`docker container cp target/hello-world-rest-api.jar naughty_knuth:/tmp`
231-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-008.png)
232-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-009.png)
233-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-010.png)
230+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-008.png)
231+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-009.png)
232+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-010.png)
234233

235234
You can also use the ID of the container.
236235

@@ -285,7 +284,7 @@ How can we do that?
285284

286285
We are adding a startup command by using an option ```--change```.
287286

288-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-011.png)
287+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-011.png)
289288

290289
#### Running The Container Again
291290

@@ -295,11 +294,11 @@ Let's do ```docker images```, and a new image is seen to be created with tag as
295294

296295
> If you have any container running on 8080, you can stop it.
297296
298-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-013.png)
297+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-013.png)
299298

300299
If we go to the browser and refresh, the URL continues to work.
301300

302-
![image info](https://github.com/in28minutes/docker-course-with-java-and-spring-boot-articles/blob/master/section04-containerizing-java-spring-boot-hello-world-rest-api-with-docker/resources/04-containerizing-java-spring-boot-hello-world-rest-api-step02-014.png)
301+
![image info](images/04-containerizing-java-spring-boot-hello-world-rest-api-step02-014.png)
303302

304303
This image we can share with anyone in the world and they can run in all environment they would wish to.
305304

57.8 KB
Loading
69.2 KB
Loading
113 KB
Loading
62.4 KB
Loading
97.6 KB
Loading
97.2 KB
Loading
95.9 KB
Loading
109 KB
Loading
177 KB
Loading

0 commit comments

Comments
 (0)