Challenge: Running a Postgres Database
Test if you can run the Postgres database.
We'll cover the following
PostgreSQL
Find the official image on the Docker hub for PostgreSQL and launch its container in the terminal below, fulfilling the following requirements:
- An interactive container.
- Should remove the container after the container stops.
- A container named
postgres
. - An exposed port of
3000
. The default port for PostgreSQL is5432
. - A persistent Docker volume named
postgresdata
. Mount the path/var/lib/postgresql/data
for this container. - Use the default user and set the password to
mysecret
.
Get hands-on with 1400+ tech skills courses.