I'm looking for a Docker image that would only have all the necessary components to make calls to an external Postgres database using the psql client in the shell. I do not need to launch a database locally or anything.
I found jbergknoff/postgresql-client, which I haven't tested, but I'm just mostly surprised there doesn't seem to be any official image for that.
For now I'm using postgres:12-alpine, but it's only as part of a CronJob launched in Kubernetes which takes care of triggering a clean up of certain tables every once in a while by calling a Postgres function.
Anyone has something to recommend? Or some insight to share?
FROM ubuntuwith a singleRUN apt-get update && apt-get installcommand wouldn't be hard. Mostly, though, it's easier to run interactive tools likepsqldirectly from the host than to get them packaged in containers andsudo docker run --rm -it registry.example.com/psqlfor this kind of task.Azure, which thus effectively means we cannot execute commands from within the host itself, nor can we usepg_cronbecause it isn't supported.