15 Free YouTube subscribers for your channel
Get Free YouTube Subscribers, Views and Likes

How to Set Up a PostgreSQL Database with Docker

Follow
Database Star

 Get your FREE cheat sheet of Docker commands: https://www.databasestar.com/dockerd...
 Learn and become confident in SQL: https://databasestar.mykajabi.com/sql...

Docker is a product that allows developers to create containers, which are selfcontained areas on their computer for running applications. They can be used for databases, which is great if you can't install it normally (e.g. you use a Mac).

This video shows you how to set up a PostgreSQL database on Docker. It uses an existing PostgreSQL image on the Docker Hub website. You can use many different versions of PostgreSQL, not just the latest version.

You'll learn how to download and install Docker, find the right PostgreSQL image, download the image, run it, and connect to it in the DBeaver IDE. You can use any other IDE that works with PostgreSQL if you prefer.

The connection details for this image mentioned in the video are below.

Host: localhost
Port: 5432
Username: postgres
Password: whatever you specify in the "docker run" command (default is mysecretpassword)

Timestamps:
00:00 In this video
00:05 Highlevel steps
00:29 Download Docker
01:23 Run Docker
02:07 Create Docker Hub account
02:41 Search for PostgreSQL image on Docker Hub
03:15 Understand the docker run command
04:29 Adjust docker run command
05:19 Open Terminal and login to Docker
06:12 Download image using Docker Run
06:52 Check status using docker ps
07:19 Connect using DBeaver
07:47 Enter connection details
08:43 Run simple query
09:05 Docker Stop command

posted by wynad2g