‫OK.
‫This is me going through the named volumes assignment for updating a database. I know it's supposed
‫to be postgres and I'm probably going to need some information from Docker Hub.
‫Let me switch over to that. OK.
‫It says I need to start with version 9.6.2.
‫No, I'm sorry. 9.6.1. I'm supposed to go to 9.6.2. Start with 9.6.1.
‫I don't see 9.6.1 in here, but I can actually find that over here hopefully in tags. I'm just going
‫to search the page for 9.6.1.
‫All right.
‫There we go.
‫Cool.
‫Now this is actually a different way
‫to look at what the Dockerfile is doing.
‫I could...it's got a volume path right here.
‫I'm going to assume that that's the same volume path for both.
‫Because they don't change that kind of thing
‫very often.
‫I going to call it 9.
‫So, OK. docker container run.
‫I don't have to worry about ports or anything.
‫We don't need ports for this.
‫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
‫volume psql.
‫I'm going to paste in that volume to store the data. Then I need to call the container post...
‫the image...I need to type the image here.
‫9.6.1. K. Now, docker container logs
‫follow..I'm going to do the -f command so that it keeps watching as it runs.
‫I think it's actually done booting.
‫Database system is ready to accept connections.
‫OK.
‫I'm going to Control c out of that.
‫So that's good.
‫I'm going to do a docker container stop psql.
‫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
‫I can't have two with the same name.
‫I'm going to do a docker container
‫ps -a, I should see
‫two different versions. One that stopped a few minutes ago. I do a docker
‫volume
‫ls. I can see that I have one volume with that correct name.
‫If I do a docker container logs
‫on this one...
‫Yeah.
‫Short, very short logs there.
‫And database system is ready to accept connections.
‫I successfully updated.