$ docker run -d --name "db" shazow/postgresql
The default context inside the docker is the postgres user and local
permissions are trusted for this user so you can run exec commands conveniently.
Try it out:
$ docker exec -it db psql
Reset postgres user password and make a fresh database:
$ docker exec db /init
ALTER ROLE
CREATE DATABASE
* Credentials: url="postgresql://postgres:[email protected]/db"
Backup script:
$ docker exec db pg_dump db > dump.sql
Content type
Image
Digest
sha256:cfa1897c2…
Size
97.3 MB
Last updated
over 9 years ago
docker pull shazow/postgresql