1
00:00:04,410 --> 00:00:04,970
OK guys.

2
00:00:04,980 --> 00:00:09,890
So we have just agreed to the very first container using hello world image.

3
00:00:10,020 --> 00:00:15,960
We have pulled it from a remote registry called Docker Hub and after Worlds have created container.

4
00:00:15,990 --> 00:00:19,890
And this container has printed some text to the terminal.

5
00:00:19,890 --> 00:00:26,550
Also in this text do you see suggestion to dry Amal's a container with this command dork around dash

6
00:00:26,640 --> 00:00:34,110
a deep wound to bash and with this command to we will be able to create a NAS or container using a wound

7
00:00:34,110 --> 00:00:41,450
to image but let's try it without the option that's a deep and best thrust simply as we have it dry

8
00:00:41,440 --> 00:00:43,190
it the wheels dock around.

9
00:00:43,200 --> 00:00:44,080
Hello world.

10
00:00:44,140 --> 00:00:49,080
Let's no type dork Iran will want to end it and see what will happen.

11
00:00:49,080 --> 00:00:50,990
Let me clear uptime and no control okay.

12
00:00:51,000 --> 00:00:54,680
And here let me type Docker on Iran.

13
00:00:54,810 --> 00:00:59,100
Do you see that we again we are not able to find.

14
00:00:59,140 --> 00:01:01,270
Image aboot latest locally.

15
00:01:01,410 --> 00:01:07,650
And that's why we have started pool operation from a remote registry Docker Hub and you'll see that

16
00:01:07,770 --> 00:01:12,170
we have pulled several times and you see here different ideas now.

17
00:01:12,300 --> 00:01:14,610
A real not explain what it means.

18
00:01:14,610 --> 00:01:19,380
We will get back to it later on when they will explain how Docker rocks under the hood.

19
00:01:19,380 --> 00:01:24,930
For now you should understand that we have simply pulled in which gold to bundle from a remote registry

20
00:01:25,020 --> 00:01:26,360
Docker Hub.

21
00:01:26,460 --> 00:01:29,560
Also you see SHA 256 hash.

22
00:01:29,580 --> 00:01:31,180
Same as we have seen before.

23
00:01:31,230 --> 00:01:38,490
Hello rolled image but of course hash itself is different here from the hash for Hello rolled image.

24
00:01:38,490 --> 00:01:41,760
Also you see finally that the image was the.

25
00:01:41,800 --> 00:01:49,230
Its status is downloaded but afterwards after we have executed basically Doc Iran want to command we

26
00:01:49,230 --> 00:01:51,080
have returned to terminal.

27
00:01:51,180 --> 00:01:58,590
It means that actually nothing happens and we are not able to do something inside or the wound to container.

28
00:01:59,310 --> 00:02:02,990
But it was immediately terminated afterwords.

29
00:02:03,010 --> 00:02:03,490
Why.

30
00:02:04,020 --> 00:02:08,949
Because there was no command that was executed inside of this winter container.

31
00:02:09,360 --> 00:02:16,470
And if there are no processes Iran in inside of the container Docker automatically terminates container

32
00:02:17,190 --> 00:02:23,260
and if I'll enter Docker B.S. now you'll see that there are no containers Iranian.

33
00:02:24,150 --> 00:02:29,180
But I am able to observe history of the containers that where exited.

34
00:02:29,250 --> 00:02:36,610
For that you could use command Docker B S with option dash a like so and now I'll see that there was

35
00:02:36,610 --> 00:02:42,110
a container that was based on a one to image and there was command.

36
00:02:42,150 --> 00:02:44,670
This one that was executed automatically.

37
00:02:44,670 --> 00:02:51,740
Here was this command but we have not performed anything inside of the bash inside of the container.

38
00:02:51,740 --> 00:02:56,450
That's why container has decided that best should exit and it was exited.

39
00:02:56,450 --> 00:03:02,480
Process was terminated and afterwords Docker has eggs that container as well.

40
00:03:02,540 --> 00:03:08,180
This way Here you see that the status of this container is exited about a minute ago.

41
00:03:08,210 --> 00:03:13,310
Also you see information about previous containers that we have created in the previous lecture and

42
00:03:13,310 --> 00:03:17,170
we have used their whole Hello rolled images here and here.

43
00:03:17,180 --> 00:03:23,540
We have created basically two different containers and you see that they were exited about an hour ago.

44
00:03:23,540 --> 00:03:24,050
Okay.

45
00:03:24,170 --> 00:03:31,680
That is the status of this container that we have tried to create using a docker Iran command.

46
00:03:31,760 --> 00:03:39,800
Also if I list now local images with command Docker images I should see here a wound to image on the

47
00:03:39,800 --> 00:03:40,700
list.

48
00:03:40,790 --> 00:03:46,310
That means that you failed Dwyer to create one more container using a 1 2 image.

49
00:03:46,370 --> 00:03:50,240
It will be created using the same image as you see here.

50
00:03:50,240 --> 00:03:54,070
There was no need to pull the same image from Docker Hub.

51
00:03:54,650 --> 00:03:56,720
Let's try that again and let's try it.

52
00:03:56,720 --> 00:04:05,590
That was the same comment as we have used before Docker Iran or window and we see actually nothing but

53
00:04:05,590 --> 00:04:11,340
again under the hood Docker has created new container based on this image.

54
00:04:11,380 --> 00:04:17,480
There was no need again to pull it from Docker Hub because we already have it here on the list but after

55
00:04:17,490 --> 00:04:20,410
the container was again automatically terminated.

56
00:04:21,040 --> 00:04:25,290
Let's have a look at history of containers Docker B.S. and DSP.

57
00:04:25,330 --> 00:04:30,720
Actually there was alternative commendable Docker appears and this command is docker container alas.

58
00:04:30,820 --> 00:04:32,230
And if I'll type here.

59
00:04:32,230 --> 00:04:40,180
Door cargo container unless there's a you'll see actually the same result as with Docker because Dash

60
00:04:40,270 --> 00:04:44,980
8 it brings us history of all containers that were created before.

61
00:04:45,460 --> 00:04:50,690
And again you see here one more container that was created using a boom to image.

62
00:04:50,770 --> 00:04:52,450
And this container was exited.

63
00:04:52,480 --> 00:04:58,000
I mean the goal here below you'll see a second container with the same image a window but this one was

64
00:04:58,090 --> 00:05:00,510
exited four minutes ago.

65
00:05:00,550 --> 00:05:07,690
It means that each time when you execute command dock Iran and some image Docker creates new container

66
00:05:07,780 --> 00:05:09,590
based on specific image.

67
00:05:10,270 --> 00:05:18,040
But now you may ask me a question how we are actually able to look into that container container and

68
00:05:18,400 --> 00:05:22,660
execute some commands inside of that wound the operating system.

69
00:05:22,660 --> 00:05:23,910
Answer is pretty simple.

70
00:05:24,100 --> 00:05:29,010
Let me show you Dr Ron dash idea.

71
00:05:29,580 --> 00:05:32,180
Let's press enter and see what will happen.

72
00:05:32,380 --> 00:05:39,700
And now you'll see that I hold basically anther best shell inside of that window container and I have

73
00:05:39,700 --> 00:05:43,870
locked in automatically as a route user here you see that.

74
00:05:44,290 --> 00:05:52,300
And here is actually a d of this container that was just created and now I am still inside of this container

75
00:05:52,660 --> 00:05:55,010
and container is still run.

76
00:05:55,840 --> 00:05:56,610
Let me show you that.

77
00:05:56,620 --> 00:05:57,700
It is still running.

78
00:05:57,700 --> 00:06:02,990
Let me open up new tab here in time now and let's enter Docker at B S command.

79
00:06:03,070 --> 00:06:09,610
Here you see image that was used this window and all you see here container I.D. And this I.D. is the

80
00:06:09,610 --> 00:06:15,460
same as you see here in this bash shell inside of that one two container.

81
00:06:16,000 --> 00:06:22,330
And now actually we are able to perform some operations inside of this container for example let's use

82
00:06:22,390 --> 00:06:26,280
a last command and list files inside of that one container.

83
00:06:26,590 --> 00:06:28,630
And here you see some set of folders.

84
00:06:28,630 --> 00:06:33,340
And for example you are able to list the files inside of the bin folder.

85
00:06:33,380 --> 00:06:40,300
Let's do that has been and you'll see some set of executable that you are able to use inside of that

86
00:06:40,300 --> 00:06:41,800
will want a container.

87
00:06:41,860 --> 00:06:48,760
Again please notice that this set of files and folders is completely isolated inside of this computer

88
00:06:48,760 --> 00:06:49,570
container.

89
00:06:49,570 --> 00:06:55,330
It is not a set of files on my Mac most computer where I am running Docker right now.

90
00:06:55,330 --> 00:07:01,510
Actually let me assure you that to prove that let me open up one more step and here let me Alice and

91
00:07:01,510 --> 00:07:06,190
you'll see actually at least of a folder on this Mac computer.

92
00:07:06,430 --> 00:07:12,970
And also I am able to list actually files in lesbian folder and you'll see it set of executable it's

93
00:07:13,060 --> 00:07:20,110
on my make us computer and this set of executable is of course different from this set of executable

94
00:07:20,110 --> 00:07:21,090
files.

95
00:07:21,220 --> 00:07:27,290
That's how you're able to list the files inside of the container and again again container is still

96
00:07:27,310 --> 00:07:27,800
around.

97
00:07:28,240 --> 00:07:29,900
You could verify it here.

98
00:07:29,980 --> 00:07:35,950
Docker appears and you see that there was a container with one image that is up and running and it is

99
00:07:36,040 --> 00:07:42,470
up to minutes and also you see here which command was executed being slashed.

100
00:07:42,500 --> 00:07:48,490
Bash does bash shell and we are actually located now in this best shell okay.

101
00:07:48,780 --> 00:07:55,480
Liz note is that the this container runs no full featured one two operating system and you could verify

102
00:07:55,480 --> 00:08:02,800
a of this operating system using cut the slash it is seam slash Oh yes that's release you see here Marshall

103
00:08:02,850 --> 00:08:09,520
womb to age no fraud not for long term support release also we could try something go so let's try for

104
00:08:09,520 --> 00:08:19,720
example X command let me clear terminal and type echo how low from one to container enter and you'll

105
00:08:19,720 --> 00:08:26,230
see a hello from a window container here in this shell please note that we are able to use this command

106
00:08:26,470 --> 00:08:32,140
because there is such executable inside of the bin folder let me list contents of a bin folder once

107
00:08:32,140 --> 00:08:38,470
again and you'll see here on the list let's twice Thompson girls let's call your terminal and type host

108
00:08:38,590 --> 00:08:45,460
name come in and you'll see here cos name of this container it actually matches with this a d here on

109
00:08:45,460 --> 00:08:51,860
the list also we're able to verify which IP address was assigned to this container using command hostname

110
00:08:52,120 --> 00:08:59,020
that I like so and you'll see IP address one hundred seventy two seventeen or two here in this output

111
00:08:59,620 --> 00:09:06,450
great that's how you're able to perform some inside of that one to container let's not type exit and

112
00:09:06,450 --> 00:09:13,980
let's exit from this bash shall exit and we have it back to our time no less.

113
00:09:13,980 --> 00:09:22,340
Now least the containers that are currently running Docker B.S. and you'll see empty output basically

114
00:09:22,340 --> 00:09:29,430
you are able to use alternative command to look up yes docker container alas and you'll see same result

115
00:09:29,760 --> 00:09:37,470
there were no containers currently running but if I'll enter Docker B S dash a you'll see that our winter

116
00:09:37,500 --> 00:09:45,180
container was exited 34 seconds ago why it was exited answer was pretty simple.

117
00:09:45,180 --> 00:09:52,140
We have exited from bash shell inside of the container and that terminate that bash brought us inside

118
00:09:52,140 --> 00:09:58,890
of the container and when there are no processes running inside of the container Docker simply terminates

119
00:09:58,980 --> 00:10:02,210
such a container and that's what actually happened here.

120
00:10:02,220 --> 00:10:03,610
In this example.

121
00:10:04,080 --> 00:10:04,590
Great.

122
00:10:04,740 --> 00:10:09,150
Let's also clear terminal and let's have a look at the size of the image.

123
00:10:09,180 --> 00:10:14,350
That was the loaded 4 1 2 containers Docker images like so.

124
00:10:14,670 --> 00:10:18,920
And here you'll see size equal to 64 megabytes.

125
00:10:19,000 --> 00:10:24,870
There's of course much more large art than science of the hello world container that was simply less

126
00:10:24,870 --> 00:10:32,940
than 2 kilobytes in size but this size is relatively small in comparison to let's say Docker installation

127
00:10:32,940 --> 00:10:33,570
itself.

128
00:10:33,570 --> 00:10:37,440
That was around 2 gigabytes for Mac OS or Windows computer.

129
00:10:38,250 --> 00:10:46,500
But this size is still large in the docker world because we have used here full featured wound to operating

130
00:10:46,500 --> 00:10:53,700
system and in the next example I would like to demonstrate you how you're able to create the Linux container

131
00:10:53,880 --> 00:10:56,340
using the smallest image possible.

132
00:10:56,340 --> 00:10:57,440
Let's try that next.

133
00:10:57,460 --> 00:10:57,720
My.

