Hi, thanks for the tutorial, I'm following your step but I can't find the /pgdata/ when I try "ls -l /pgdata/". I'm using win10. This is the command I used "docker container run -d --name=pg -p 5432:5432 -e POSTGRES_PASSWORD=password -e PGDATA=/pgdata -v /pgdata:/pgdata postgres"
In Windows the path on the host will not be /pgdata (unless you're using WSL), so -v /pgdata:/pgdata should be changed to -v /pgdata: and you need to ensure that Docker has permissions to mount the directory
@@isapir As clear and concise as your video is, it could be just a tad more complete. The string ""should be changed to -v /pgdata:", for me, is ambiguous. If I ever solve that, I still have to "ensure that Docker has permissions to mount the directory". In Windows, how is that done?
When i try to connect with SQLDeveloper, using the JBDC driver, it says that the connection attemp failed and the docker container is up :/ EDIT: I was using a wrong ip to connect
How is it that pg11 has the table that was created in pg? isnt pg11 a whole new container? Is it because we are pointing to the same "/pgdata" on localhost?
Exactly. The /pgdata directory contains all the data that the Postgres instance needs, including tables. When we create a new container and mount the existing /pgdata directory the table and other data and settings are available to the new container.
On running docker run, I get the error message: docker: Error response from daemon: pull access denied for 5432, repository does not exist or may require 'docker login': denied: requested access to the resource is denied I have also tried 'docker login' command but still same issue.
Very cool trick.. keeping the data folder and just upgrading the postgres in the container (for minor version upgrades of course)
I was looking for something specific, but it was worth watching it from the beginning to the end. Keep it up!
Thank you!
thanks for this one, exactly what I was looking for
excellent video, short, to the point, does one job and does it well, thanks. also useful to know about dbeaver.
Excellent Video, Thank you, can you please make a video on how to do major version upgrade from 10 to 13 ...it will be very useful
This video is useful, thank you
Excellent video, very clear
Thank you for the feedback Luuk, I appreciate it :)
just what needed thanks
This was very useful, thank you
Thank you, your video helped me so much!
Thank you for the feedback Asma!
Excellent tutorial!
This helped me a lot! Thanks!
you are the best!!
Thank you, man!
Hi, thanks for the tutorial, I'm following your step but I can't find the /pgdata/ when I try "ls -l /pgdata/". I'm using win10. This is the command I used
"docker container run -d --name=pg -p 5432:5432 -e POSTGRES_PASSWORD=password -e PGDATA=/pgdata -v /pgdata:/pgdata postgres"
In Windows the path on the host will not be /pgdata (unless you're using WSL), so -v /pgdata:/pgdata should be changed to -v /pgdata: and you need to ensure that Docker has permissions to mount the directory
@@isapir As clear and concise as your video is, it could be just a tad more complete. The string ""should be changed to -v /pgdata:", for me, is ambiguous. If I ever solve that, I still have to "ensure that Docker has permissions to mount the directory". In Windows, how is that done?
Great video, i am having this issue :
Command 'psql' not found
The container is up ...
same here.. any ideas?
got it.. need to install the client on host using sudo apt-get install postgresql-client
@@ThomasJoseph9 Correct. If you run client software from the host then it should be installed on the host machine.
How second container get the table data of first container in itself ?
great one thank you.
Many thanks!!
very clear!
thanks it helped me!!!
Nice video. May i know how we can create extensions with same postgresql version ?
When i try to connect with SQLDeveloper, using the JBDC driver, it says that the connection attemp failed and the docker container is up :/
EDIT:
I was using a wrong ip to connect
How is it that pg11 has the table that was created in pg?
isnt pg11 a whole new container?
Is it because we are pointing to the same "/pgdata" on localhost?
Exactly. The /pgdata directory contains all the data that the Postgres instance needs, including tables. When we create a new container and mount the existing /pgdata directory the table and other data and settings are available to the new container.
On running docker run, I get the error message:
docker: Error response from daemon: pull access denied for 5432, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I have also tried 'docker login' command but still same issue.
Opps! My mistake. Just missed -p in the command.
Hi i need to create a database and add some table and data, then build a docker image from that pulled image ???
yes. you can create it