1 00:00:04,640 --> 00:00:05,130 ‫OK. 2 00:00:05,140 --> 00:00:12,550 ‫This is me going through the named volumes assignment for updating a database. I know it's supposed 3 00:00:12,550 --> 00:00:17,360 ‫to be postgres and I'm probably going to need some information from Docker Hub. 4 00:00:17,640 --> 00:00:21,510 ‫Let me switch over to that. OK. 5 00:00:21,760 --> 00:00:27,050 ‫It says I need to start with version 9.6.2. 6 00:00:27,080 --> 00:00:32,020 ‫No, I'm sorry. 9.6.1. I'm supposed to go to 9.6.2. Start with 9.6.1. 7 00:00:32,020 --> 00:00:40,560 ‫I don't see 9.6.1 in here, but I can actually find that over here hopefully in tags. I'm just going 8 00:00:40,560 --> 00:00:44,770 ‫to search the page for 9.6.1. 9 00:00:44,780 --> 00:00:45,740 ‫All right. 10 00:00:45,750 --> 00:00:46,760 ‫There we go. 11 00:00:49,320 --> 00:00:49,740 ‫Cool. 12 00:00:49,750 --> 00:00:52,320 ‫Now this is actually a different way 13 00:00:54,340 --> 00:00:56,350 ‫to look at what the Dockerfile is doing. 14 00:00:58,560 --> 00:01:04,830 ‫I could...it's got a volume path right here. 15 00:01:07,360 --> 00:01:10,220 ‫I'm going to assume that that's the same volume path for both. 16 00:01:10,250 --> 00:01:12,080 ‫Because they don't change that kind of thing 17 00:01:12,920 --> 00:01:14,050 ‫very often. 18 00:01:15,690 --> 00:01:17,360 ‫I going to call it 9. 19 00:01:17,370 --> 00:01:21,280 ‫So, OK. docker container run. 20 00:01:21,810 --> 00:01:23,510 ‫I don't have to worry about ports or anything. 21 00:01:23,520 --> 00:01:24,720 ‫We don't need ports for this. 22 00:01:24,730 --> 00:01:34,500 ‫I'm going to use a -d to put it in the background. Then I'm just going to name it psql. Then I'm going to call the 23 00:01:34,500 --> 00:01:36,260 ‫volume psql. 24 00:01:36,620 --> 00:01:44,130 ‫I'm going to paste in that volume to store the data. Then I need to call the container post... 25 00:01:44,180 --> 00:01:48,060 ‫the image...I need to type the image here. 26 00:01:48,460 --> 00:01:59,020 ‫9.6.1. K. Now, docker container logs 27 00:02:01,750 --> 00:02:19,990 ‫follow..I'm going to do the -f command so that it keeps watching as it runs. 28 00:02:20,130 --> 00:02:21,450 ‫I think it's actually done booting. 29 00:02:24,120 --> 00:02:25,890 ‫Database system is ready to accept connections. 30 00:02:25,920 --> 00:02:26,320 ‫OK. 31 00:02:26,560 --> 00:02:29,450 ‫I'm going to Control c out of that. 32 00:02:29,510 --> 00:02:30,170 ‫So that's good. 33 00:02:30,190 --> 00:02:38,110 ‫I'm going to do a docker container stop psql. 34 00:02:38,290 --> 00:02:46,380 ‫I going to hit the Up Arrow. I'm going to change this to a 2. I need to change the name to a 2, because 35 00:02:46,400 --> 00:02:52,430 ‫I can't have two with the same name. 36 00:02:52,480 --> 00:02:55,650 ‫I'm going to do a docker container 37 00:02:55,670 --> 00:02:57,880 ‫ps -a, I should see 38 00:03:03,560 --> 00:03:08,270 ‫two different versions. One that stopped a few minutes ago. I do a docker 39 00:03:11,120 --> 00:03:12,080 ‫volume 40 00:03:12,120 --> 00:03:19,560 ‫ls. I can see that I have one volume with that correct name. 41 00:03:19,890 --> 00:03:23,280 ‫If I do a docker container logs 42 00:03:25,420 --> 00:03:26,600 ‫on this one... 43 00:03:26,920 --> 00:03:27,440 ‫Yeah. 44 00:03:27,730 --> 00:03:30,530 ‫Short, very short logs there. 45 00:03:30,920 --> 00:03:33,720 ‫And database system is ready to accept connections. 46 00:03:33,770 --> 00:03:35,750 ‫I successfully updated.