This command will download and run docker container
Note: username = postgres
To run the image and expose the port 5442 of docker image to host port
If you need to download postgresql client
To connect the postgres data hosted in docker container with psql client
https://docs.docker.com/samples/library/postgres/
https://zaiste.net/posts/docker_postgresql_how_to/
https://hub.docker.com/_/postgres/
https://docs.docker.com/engine/examples/postgresql_service/#connecting-from-your-host-system
sudo docker run --name dipen-postgres
-p 5432:5432 -e POSTGRES_PASSWORD=<your-password> -d postgres
Note: username = postgres
To run the image and expose the port 5442 of docker image to host port
sudo docker run -p 5432:5432 postgres
If you need to download postgresql client
sudo apt-get install postgresql-client
To connect the postgres data hosted in docker container with psql client
psql -h localhost -p 5432 -U postgres
https://docs.docker.com/samples/library/postgres/
https://zaiste.net/posts/docker_postgresql_how_to/
https://hub.docker.com/_/postgres/
https://docs.docker.com/engine/examples/postgresql_service/#connecting-from-your-host-system
No comments:
Post a Comment