diff --git a/setup/coder-for-docker/local.md b/setup/coder-for-docker/local.md index 0b5745644..2f0411c1c 100644 --- a/setup/coder-for-docker/local.md +++ b/setup/coder-for-docker/local.md @@ -208,6 +208,20 @@ following flags with the `docker run` command: If you're interested in using Docker as a workspace provider, please see our [deployment instructions](../../admin/workspace-providers/deployment/docker.md). +## Accessing the local PostgreSQL database + +To query the local PostgreSQL database using the `psql` [terminal-based +front-end](https://www.postgresql.org/docs/13/app-psql.html), follow these +steps. + +1. Run `docker ps` to get the name of the Coder container. + +1. Exec into the Coder container and connect to the database. + + ```console + docker exec -it psql --username=coder --host=0.0.0.0 --port=5433 --dbname=postgres + ``` + ## Known issues Currently, Coder for Docker does not support: