1
00:00:00,330 --> 00:00:07,080
So the next step is to push those two images that were built locally to private repository, and I think

2
00:00:07,080 --> 00:00:15,360
Docker Hub is the easiest to set up if you don't have a repository because you just need to sign up

3
00:00:15,360 --> 00:00:19,950
and you get one private repository for free, which is all we need.

4
00:00:20,490 --> 00:00:23,130
So I already have an account, so I'm just going to sign in.

5
00:00:27,390 --> 00:00:33,150
My count is basically blank, I don't have anything yet, so I'm going to go to repositories and create

6
00:00:33,570 --> 00:00:40,320
one, I'm going to create a private one because usually when you're creating your own applications,

7
00:00:40,320 --> 00:00:44,650
you would host them on a private repository, which is a realistic scenario.

8
00:00:44,670 --> 00:00:47,930
That's why I'm using it in this tutorial.

9
00:00:48,570 --> 00:00:51,540
So let's give it a name of Daymo.

10
00:00:51,570 --> 00:00:56,280
If this is a repository where we will host both images.

11
00:00:56,640 --> 00:00:58,800
So we're just going to give them a common name.

12
00:00:58,860 --> 00:00:59,610
It's going to be Daymo.

13
00:00:59,610 --> 00:01:04,560
If you can also create a repository per application and they have different takes.

14
00:01:04,800 --> 00:01:13,950
But we're going to do both in one repository that's created and we're ready to push our image.

15
00:01:14,100 --> 00:01:19,920
Now, here is a comment to push your images to a repository.

16
00:01:19,920 --> 00:01:26,640
But important to note that before it you can do that, you have to authenticate to Docker Hub and your

17
00:01:26,640 --> 00:01:28,240
private repository, obviously.

18
00:01:29,130 --> 00:01:30,360
So how do you do that?

19
00:01:30,360 --> 00:01:40,470
Is using Docker login form your command line and you use the same credentials that you used when logging

20
00:01:40,470 --> 00:01:42,260
in Web application.

21
00:01:42,570 --> 00:01:45,080
So I'm going to go ahead and do docker login.

22
00:01:45,240 --> 00:01:46,290
My username.

23
00:01:47,010 --> 00:01:55,560
It has remembered it is this one right here and the password, same as I have here.

24
00:01:55,650 --> 00:01:59,670
So this is my password and I am logged in.

25
00:02:00,180 --> 00:02:07,650
So this Docker login basically creates a local config file that stores the credentials.

26
00:02:07,890 --> 00:02:08,160
Right.

27
00:02:08,310 --> 00:02:13,510
So now you can pull and push images from your private repository.

28
00:02:13,590 --> 00:02:15,150
So we did Docker log in.

29
00:02:15,160 --> 00:02:20,540
The second thing we need to do is we need to take our local images accordingly.

30
00:02:21,000 --> 00:02:21,320
Right.

31
00:02:21,540 --> 00:02:28,280
So the take is basically the name of the repository and the tag name.

32
00:02:28,530 --> 00:02:32,370
Let's go see what is the current take of our images.

33
00:02:33,810 --> 00:02:35,280
Docker images.

34
00:02:38,910 --> 00:02:39,130
Right.

35
00:02:39,570 --> 00:02:47,010
This is the current name and take over images and we have to rename them or retake them, so to say

36
00:02:47,400 --> 00:02:54,750
we can do that with Dr. Teg and I'm just going to copy those, actually.

37
00:02:56,940 --> 00:02:58,560
So this is the repository name.

38
00:03:00,030 --> 00:03:10,260
My doctor Idy and the repository name and the tech will actually be Java EP A. Responsively, we can

39
00:03:10,260 --> 00:03:16,560
also do Java and then a version like 1.0 doesn't matter.

40
00:03:16,770 --> 00:03:20,070
Doctor Tech actually takes two arguments.

41
00:03:20,070 --> 00:03:27,540
The first one is the original image, which is Java EP latest, this one right here.

42
00:03:28,230 --> 00:03:33,090
And this is going to be the new name sort of saying, so let's do that.

43
00:03:34,440 --> 00:03:42,150
And if I do the images again, I see the copy of Java got created and it has a new name now.

44
00:03:42,640 --> 00:03:49,800
Now, the reason for that is or why we have to take those images is that otherwise Docker doesn't know

45
00:03:50,100 --> 00:03:53,370
where to push those images when you execute Docker push.

46
00:03:53,640 --> 00:03:53,970
Right.

47
00:03:54,120 --> 00:04:03,000
So if I had Java EP latest, it wouldn't know to which repository it should actually push that because

48
00:04:03,000 --> 00:04:06,670
you may do docker login for multiple repositories at the same time.

49
00:04:07,170 --> 00:04:11,790
So that's the way of packaging that destination.

50
00:04:11,790 --> 00:04:13,890
Information inside the image name.

51
00:04:17,660 --> 00:04:23,210
EP and the take, and they should upload.

52
00:04:24,200 --> 00:04:31,690
Our Java image into the story, and this may take a couple of seconds, so it's done pushing.

53
00:04:31,730 --> 00:04:37,430
And here you see we have one tech, which is Java 1.0.

54
00:04:37,820 --> 00:04:42,600
Now, I have to mention here, normally you would have a repository for your application.

55
00:04:42,920 --> 00:04:49,130
So for one application like Java, this would be a repository Java Web, and then you would have maybe

56
00:04:49,130 --> 00:04:56,350
different versions like 1.0, 2.0 or two point one, et cetera, as text.

57
00:04:56,630 --> 00:05:02,170
But here we just put it in both of them in one repository because one we have just one repository available.

58
00:05:02,180 --> 00:05:06,510
And second, it doesn't really make much difference for our setup.

59
00:05:08,360 --> 00:05:13,570
So Java Web image is already in repository.

60
00:05:13,580 --> 00:05:15,710
Let's do the same for no JS image.

61
00:05:16,190 --> 00:05:19,370
Let's again do that tagging.

62
00:05:20,030 --> 00:05:25,340
So node EBR latest will be tagged to

63
00:05:27,890 --> 00:05:28,520
node.

64
00:05:30,230 --> 00:05:31,760
Again, one point zero.

65
00:05:33,450 --> 00:05:38,250
And then we're going to just push that into the repository.

66
00:05:42,150 --> 00:05:45,250
So let's see that the images here.

67
00:05:45,780 --> 00:05:48,840
So now we have both images in our private report story.
