Having installed Docker on your machine, it's time to run the containerized version of PostgreSQL, as follows:
- Open a new Terminal window and launch the following command:
$ docker run --name postgres_thorntail \-e POSTGRES_PASSWORD=postgresPwd -e POSTGRES_DB=football_players_registry \-d -p 5532:5432 postgres
This command will trigger a pull from Docker's public registry for the PostgreSQL version labeled as the latest, downloading all of the layers that it needs to run the container on, as depicted in the following output:
Unable to find image 'postgres:latest' locally latest: Pulling from library/postgres 683abbb4ea60: Pull complete c5856e38168a: Pull complete c3e6f1ceebb0: Pull complete 3303bcd00128: ...