-
Notifications
You must be signed in to change notification settings - Fork 0
PostgreSQL commands
Daisho Komiyama edited this page Dec 26, 2022
·
28 revisions
docker pull postgres:15
docker run -e POSTGRES_PASSWORD=<your_password> --name=<your_container_name> --rm -d -p 5432:5432 postgres:15
-e = environment variable (i.e., POSTGRES_PASSWORD
)
-d = detaches (runs in the background)
-p = exposes to port
docker exec -u postgres -it <your_container_name> psql
\l