-
🌊 @dnldnz@craig-gomes some improvement suggestions:
- Link to Mockaroo.com
- Suggest checking "include CREATE TABLE" and Format: SQL.
Edited by Daniel Diniz -
Done, good suggestions @dnldnz
-
🦊 @emchangFor the upcoming training, we will be using PostgreSQL 13:
docker run --name postgres_training -e POSTGRES_PASSWORD=mysecretpassword -d postgres:13 -
If you want to follow the postgres installation process, you can instead create a container running ubuntu:
docker run --name pg_training -t -d ubuntu:20.04 docker exec -it pg_training /bin/bashInside the container you'll need to install the following additional packages:
apt install -y lsb-release wget sudo gnupg -
🔴 @brodockwhen using the postgres_training image, in order to have utility applications installed, you can do the following:
apt update && apt install lsb-core procpsWhen using
postgres:13image installlsb-releaseisntead:apt update && apt install lsb-release procpsEdited by Gabriel Mazetto -
🔴 @brodockI also found out that using docker composer is easier when just playing with queries index etc... here is my "just works" version:
docker-compose.yml
version: "3.9" services: pgtraining: build: . environment: POSTGRES_PASSWORD: mysecretpassword volumes: - pgdata:/var/lib/postgresql/data psql: build: . environment: PGPASSWORD: mysecretpassword command: psql -h pgtraining -U postgres volumes: pgdata:Dockerfile
FROM postgres:13 RUN apt update && \ apt install -y lsb-release procps && \ apt-get clean && rm -f /var/lib/apt/lists/*_*boot up the database:
docker-compose up -dconnect to the database:
docker-compose run psqltear down:
docker-compose down
Please register or sign in to comment