🌐
Docker
docker.com › blog › how to use the postgres docker official image | docker
How to Use the Postgres Docker Official Image | Docker
November 6, 2024 - services: web: build: . ports: ... · To launch your Postgres database and supporting services, enter the docker compose -f [FILE NAME] up command....
🌐
Docker
hub.docker.com › _ › postgres
postgres - Official Image | Docker Hub
As an alternative to passing sensitive ... Docker secrets stored in /run/secrets/<secret_name> files. For example: $ docker run --name some-postgres -e POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd -d postgres Copy...
Discussions

Deploying PostgreSQL Docker Container for the First Time: Need Guidance!
You can't deploy a Postgres docker container to vercel as we can see [here]( https://vercel.com/guides/does-vercel-support-docker-deployments ) I do know that Vercel provides DBs as a Service, but it's preferable to just buy a DB somewhere (planetbase or even supabase for example) If you really wanna use the docker-compose, simply get a VPS, it's much cheaper and you'd learn a lot! More on reddit.com
🌐 r/nextjs
1
3
April 28, 2024
Running PostgreSQL in a Docker container for production use, pros and cons?
This gives a pretty good run down of some good thoughts about it: https://vsupalov.com/database-in-docker/ I'll admit my knowledge may be a bit out of date with Docker as well, but I know for quite some time, there were several cases where Docker would tell Postgres it had flushed data to disk when it really hadn't, which meant there were scenarios where a crash/power outage/etc could cause data loss. My general thought is that if your project has a lot of writes or has "mission critical" data, or is likely to get big, don't put Postgres in Docker. If you are using Postgres for a data store where the website is mostly reading, or the data you are storing is not a huge deal if lost (session data, etc), then it shouldn't be a huge deal. More on reddit.com
🌐 r/PostgreSQL
10
8
May 22, 2020
Postgres with Docker and Docker compose a step-by-step guide for beginners
Hey thanks a lot per this tutorial u/geshan ... it is exactly what I am working on in a project. IF you allow me I would like to ask you a question .. How we could access Postgres database running in a container from a Node.js application also inside another container but running in another HOST in the same Network the one where Postgres is running ? My use case is like that : MacOS 1 and MacOS 2 on the same LAN MacOS 1 : Run Docker Desktop and I have the Postgres Container MacOS 2 : Run Docker Desktop and I have my NodeJs app Container I would like to use docker-compose Best Regards More on reddit.com
🌐 r/docker
8
36
December 25, 2021
Using Postgres with docker in production
Don't take this the wrong way, but if you have to ask that question, it tells me you're the right audience for managed database services. Running Postgres in production with backups, security, etc. is quite complicated. If you're running your own Pg server on EC2, assume it could go down at any time. More on reddit.com
🌐 r/PostgreSQL
23
22
November 7, 2022
🌐
DataCamp
datacamp.com › tutorial › postgresql-docker
PostgreSQL in Docker: A Step-by-Step Guide for Beginners | DataCamp
April 14, 2025 - Learn how to run PostgreSQL in Docker containers with this comprehensive guide. Set up, configure, connect, and manage containerized Postgres databases quickly.
🌐
Beekeeper Studio
beekeeperstudio.io › blog › docker-postgres
Postgres in Docker - A Practical Guide | Beekeeper Studio
September 21, 2024 - docker run -d \ --name psql \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=example \ -v psql:/var/lib/postgresql/data \ -p 5555:5432 \ postgres:latest
🌐
Baeldung
baeldung.com › home › docker › postgresql with docker setup
PostgreSQL with Docker Setup | Baeldung on Ops
July 23, 2025 - Now we’ll run the Docker container ... command: $ docker run -itd -e POSTGRES_USER=baeldung -e POSTGRES_PASSWORD=baeldung -p 5432:5432 -v ./data:/var/lib/postgresql/data --name postgresql postgres 5aeda2b20a708296d22db4451d0ca57e8d23acbfe337be0dc9b526a33b302cf5...
🌐
GitHub
github.com › sameersbn › docker-postgresql
GitHub - sameersbn/docker-postgresql: Dockerfile to build a PostgreSQL container image which can be linked to other containers. · GitHub
docker run --name postgresql -itd --restart always \ --env 'DB_USER=dbuser' --env 'DB_PASS=dbuserpass' \ --env 'DB_NAME=dbname1,dbname2' \ sameersbn/postgresql:15-20230628 · In the above example dbuser with be granted access to both the dbname1 and dbname2 databases.
Starred by 1.1K users
Forked by 470 users
Languages   Shell 90.1% | Dockerfile 9.1% | Makefile 0.8%
🌐
GitHub
github.com › zseta › postgres-docker-samples
GitHub - zseta/postgres-docker-samples: PostgreSQL database samples with Docker · GitHub
host=localhost port=5432 database=example user=postgres password=password string=postgresql://postgres:password@localhost:5432/example
Starred by 6 users
Forked by 2 users
Languages   Shell 63.6% | Dockerfile 36.4%
Find elsewhere
🌐
Earthly
earthly.dev › blog › postgres-docker
Using Docker with Postgres: Tutorial and Best Practices - Earthly Blog
July 11, 2023 - In this section, you’re going to run a PostgreSQL instance using Docker and use a graphical user interface (GUI) and pgAdmin to connect to the database. To begin, you need to have Docker installed on your machine.
🌐
DB Vis
dbvis.com › thetable › how-to-set-up-postgres-using-docker
How to Set Up Postgres using Docker
March 27, 2025 - To ensure data persistence, use a Docker volume when running your Postgres container. The example command in this guide includes:
🌐
SquaredUp
squaredup.com › blog › running-postgres-in-docker
Running Postgres in Docker - SquaredUp
May 21, 2025 - In the Connection tab enter "localhost" ... in the example I provided): Click Save and it will automatically connect to your Postgres instance. From here you can create and browse databases and tables (I created one called "Deleteme" in the screenshot below) or run queries to confirm that everything is working as expected: Running apps using Docker is a great ...
🌐
EnterpriseDB
enterprisedb.com › docs › dev-guides › deploy › docker
EDB Docs - Installing PostgreSQL in a Docker container on your local machine
For example, on Ubuntu: ... sudo apt update sudo apt install docker.io sudo systemctl start docker sudo systemctl enable docker sudo usermod -ag docker $USER newgrp docker · To pull the latest PostgreSQL image from Docker Hub, open a terminal ...
🌐
Medium
medium.com › @jewelski › quickly-set-up-a-local-postgres-database-using-docker-5098052a4726
Quickly set up a local postgres database using docker | by jewelski | Medium
December 28, 2022 - You can use the POSTGRES_PASSWORD ... in the Docker Compose file. Click the Save button to create the server. That’s it! Your database should now be up and running, and you should be able to connect to it using pgAdmin or any other PostgreSQL client. To verify that the database is working correctly, you can try running a few simple queries. For example, you can create ...
🌐
SQL Shack
sqlshack.com › getting-started-with-postgresql-on-docker
Getting started with PostgreSQL on Docker
August 12, 2022 - Now, we are good to start pulling the PostgreSQL Docker image to our local machine. Docker images are hosted on a repository on the cloud known as the Docker hub. You can pull images from the Docker hub and can also publish your images to the Docker hub. The official PostgreSQL Docker image can be found on the Docker Hub.
🌐
PhoenixNAP
phoenixnap.com › home › kb › web servers › how to run postgresql on docker
How to Run PostgreSQL on Docker | phoenixNAP KB
February 5, 2025 - Follow the steps below to run a PostgreSQL container: ... 2. Create a new docker-compose.yml file with a text editor of your choice (in this example, we used nano):
🌐
Medium
medium.com › @okpo65 › mastering-postgresql-with-docker-a-step-by-step-tutorial-caef03ab6ae9
Mastering PostgreSQL with Docker: A Step-by-Step Tutorial | by Jihwan | Medium
October 30, 2023 - For those who prefer not to use ... with Local Directory attached $ docker run -d -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=$USER_PASSWORD -v ~/pgdata:/var/lib/postgresql/data postgres # inspect local directory $ cd pgdata ...
🌐
Linuxiac
linuxiac.com › home › tutorials › how to run postgresql with docker: a step-by-step guide
How to Run PostgreSQL with Docker: A Step-by-Step Guide
February 27, 2023 - In the example shown, our PostgreSQL container is named “pg-postgres-1.” You can also use the container ID instead of a name, which in the example shown is “37c52cf79923.” To connect directly to it, we need to run the following:
🌐
YouTube
youtube.com › caleb curry
Run Postgres in a Docker Container (Easiest PostgreSQL Setup) - YouTube
💰 Mentorship to six figure software engineer - https://calcur.tech/mentorship⚙️ Backend Engineering Mind Map - https://calcur.tech/mindmap💻 System Design P...
Published   September 20, 2024
Views   8K
🌐
Docker
docs.docker.com › guides › pre-seeding database with schema and data at startup for development environment
Pre-seeding database with schema and data at startup for development environment | Docker Docs
3 weeks ago - $ docker exec -it my_postgres_db psql -h localhost -U postgres sampledb · sampledb=# SELECT * FROM users; id | name | email ----+-------+---------------- 1 | Alpha | alpha@example.com 2 | Beta | beta@example.com 3 | Gamma | gamma@example.com ...
🌐
Docker
docs.docker.com › guides › postgresql specific guide
PostgreSQL specific guide | Docker Docs
2 weeks ago - Here's an example that combines both internal and external access: services: db: image: postgres:18 container_name: postgres-dev environment: POSTGRES_PASSWORD: mysecretpassword volumes: - postgres_data:/var/lib/postgresql ports: - "127.0.0.1:5432:5432" # Expose to localhost only networks: - app-network app: build: ./my-app environment: DATABASE_URL: postgresql://postgres:mysecretpassword@db:5432/mydb networks: - app-network depends_on: - db volumes: postgres_data: networks: app-network: driver: bridge