When you run a Docker container, no Docker ports are accessible by outside services. To override this default behavior, you need to use the
-p flag that binds a container port to a port on the Docker host. The syntax is
The Community Edition is bundled with an instance of PostgreSQL, running internally on port 5432. Running the container with
-p 5432:5432 allows you to access the database from your favorite SQL client. The database is called
demo and you can access it at
postgresql://localhost:5432/demo with the username
demouser and password
demopass. See documentation for details about the demo database.
Do you already have your own PostgreSQL database running on
localhost:5432? Run the Docker container with
-p 5433:5432. The demo database will still run in Docker on port 5432 and you can access it outside the container on port 5433.