Docker Community Forums

Share and learn in the Docker community.

Image for PSQL just to connect to an existing Postgres instance, not creating my own DB

I did some honest searching for phrases along the lines ‘Docker PSQL’, ‘Docker image connect to Postgres’ etc. The search results are crowded out by images for Docker images to create a Postgres DB using an image. My use case is that I only want an image to run PSQL commands against an existing Postgres db.

Sure I can build my own, but before doing so I wanted to check if one exists already for this purpose? I couldn’t find any and was surprised.

Is there a PSQL image that connects to a Postgres instance for returning query results?