January 2019
Intermediate to advanced
520 pages
14h 32m
English
To create our database, you can use Docker, which automatically pulls all the necessary layers of the images containing the preinstalled PostgreSQL database. It's important to note that PostgreSQL has official images on Docker Hub, and you should opt to use these instead of unofficial ones, because the latter have a greater risk of malicious updates.
We need to start a container with a PostgreSQL database instance. You can do this using the following command:
docker run -it --rm --name test-pg -p 5432:5432 postgres
What does this command do? It starts a container from the postgres image (the latest version) and uses port 5432 on the localhost to forward it to the inner port, 5432, of the container (that is, the ...
Read now
Unlock full access