1
00:00:04,400 --> 00:00:10,760
In the previous lecture, we have successfully created a new container based on Hello world image and

2
00:00:10,760 --> 00:00:13,280
we have seen such output in the terminal.

3
00:00:13,520 --> 00:00:20,030
Now let me explain you what actually happened under the hood and why this container has printed this

4
00:00:20,030 --> 00:00:21,230
text to the terminal.

5
00:00:21,530 --> 00:00:24,960
Let me show you one more diagram with image example.

6
00:00:24,980 --> 00:00:30,110
I have told you that every image is simply a set of different layers.

7
00:00:30,810 --> 00:00:34,170
In one of those layers there are instructions.

8
00:00:34,200 --> 00:00:41,670
Text instructions which tell Docker what it needs to do when new container is created based on specific

9
00:00:41,670 --> 00:00:42,240
image.

10
00:00:43,140 --> 00:00:46,280
For example, let's have a look at this image.

11
00:00:46,290 --> 00:00:49,380
In this image, there are several layers.

12
00:00:50,240 --> 00:00:52,100
Base image is Ubuntu.

13
00:00:52,430 --> 00:00:59,600
In the next layer there is an application that was installed in separate layer and for example there

14
00:00:59,600 --> 00:01:01,280
is WordPress application.

15
00:01:01,900 --> 00:01:10,480
And finally, there is an additional layer with some text, with some command that tells what container

16
00:01:10,480 --> 00:01:12,850
needs to do when it is created.

17
00:01:13,630 --> 00:01:19,540
And example of the command in this particular image is start WordPress process.

18
00:01:20,400 --> 00:01:24,660
Of course, this command is in human words, but under the hood it will be different.

19
00:01:24,660 --> 00:01:32,040
But again, idea is that there is a specific command that tells what to do, which process to start

20
00:01:32,040 --> 00:01:34,170
when new container is created.

21
00:01:35,150 --> 00:01:43,130
And in this example when we have started Hello world container, there is an instruction to run specific

22
00:01:43,130 --> 00:01:46,550
executable file that prints text to the terminal.

23
00:01:46,580 --> 00:01:47,480
That's it.

24
00:01:47,690 --> 00:01:53,300
And I could actually quickly show you where is this file inside of the container.

25
00:01:53,300 --> 00:01:56,800
For that I could enter Docker inspect command.

26
00:01:56,810 --> 00:02:02,450
Actually, I need to enter Docker dash first in order to find out ID of the container.

27
00:02:02,480 --> 00:02:03,110
No worries.

28
00:02:03,110 --> 00:02:04,970
We will talk about it a bit later.

29
00:02:04,970 --> 00:02:10,070
And next type docker inspect and copy this id from here.

30
00:02:10,070 --> 00:02:11,030
Like this.

31
00:02:11,750 --> 00:02:14,480
And let me scroll up a bit.

32
00:02:15,240 --> 00:02:19,290
And here you could find cmd instruction.

33
00:02:19,590 --> 00:02:24,590
And in this container Hello file was executed.

34
00:02:24,600 --> 00:02:32,180
It is basically Linux executable file and this goal just simply print such text to the terminal.

35
00:02:32,190 --> 00:02:33,060
That's it.

36
00:02:33,760 --> 00:02:34,510
All right.

37
00:02:34,510 --> 00:02:39,970
But what is container and what you are able to do inside of the container?

38
00:02:40,090 --> 00:02:42,580
Let me answer this question in the next lecture.

39
00:02:42,610 --> 00:02:43,480
See you there.

