$ docker pull postgres
$ docker run --name ss-pg -e POSTGRES_PASSWORD=secret -d -p 5432:5432 postgres
This pulls the Postgres image and runs it with name ss-pg
. You'll probably want to pick a better password than just secret
. This is the password for the postgres
admin user. The option -p 5432:5432
makes the Postgres instance available on localhost on port 5432, which will be convenient later when we fill it with data.