Skip to content

learning

Getting Postgres up on Docker

This took me a while to figure out from scratch. The most important thing is to know that docker pull postgres retrieves an image from the main Docker registry.

After you retrieve the image, you run a container with parameters, which are used in its entrypoint file, to set up a database. But you still have to know to mount a volume from the “host” (the physical machine) and to expose ports.

docker run -p 5432:5432 --rm --name postgres_container -d -v /var/www/postgres_data:/var/lib/postgresql/data -e POSTGRES_DB=yourdb -e POSTGRES_USER=youruser -e POSTGRES_PASSWORD=yourpassword postgres

Note here that postgres (the last argument to run) is the name of the image which is what you get when you run the pull from Docker.

Espantos De Agosto

The Horrors of August

Llegamos a Arezzo un poco antes del medio día, y perdimos más de dos horas buscando el castillo renacentista que el escritor venezolano Miguel Otero Silva había comprado en aquel recodo idílico de la campiña toscana. Era un domingo de principios de agosto, ardiente y bullicioso, y no era fácil encontrar a alguien que supiera algo en las calles abarrotadas de turistas.

Read More →