docker run -d --name postgres -e POSTGRES_PASSWORD=Pass2020! -v postgres-data:/var/lib/postgresql/data -p 5432:5432 postgres:11-alpine
More env vars at https://hub.docker.com/_/postgres.
Hop into the container:
docker exec -it postgres bash
And use the psql repl.