General question about image with Postgres [thingsboard/tb-postgres]

Dear all,

I am running a container with the image “thingsboard/tb-postgres”. Now I am trying to understand how this is set up.

Since it contains a PostgreSQL, I was expecting to be able to see something if I type which psql in the console.

But there is no reply…even if I attach to the running container. Any thoughts?

Thank you

An image contains whatever the maintainer installed in it or the base image already contained. If the image maintainer did not install a postgresql command line client, you will not find it in the container.

The application running in the container does not ncessarily need a command line application. It looks like it is java based, so it can connect from Java and the container was not built for interactive users and contains only the server. You can inspect how the image was built the tags tab on Docker Hub and choosing a version

https://hub.docker.com/layers/thingsboard/tb-postgres/4.2.0/images/sha256-f9ffdb7d15135f422aa2903b2d4b41f36af5027bb4ca9a58637cede743b92e78

Click on the instructions and you will see the whole scrollable instruction on the right side.

I did not try to pull the image and find a command line postgres client, but if you want to try, you can also use the “find” command like:

find / -name psql

For more help, you can try to contact the maintainer or learn more about the appfrom the open source code

This is also linked in the documentation of ThingsBoard which is linked in the image description on Docker Hub.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.