Proper way to monitor PostgreSQL running inside a docker container -


i'm running docker container centos 7 + postgresql 9.4. using this docker image.

so, after pulling image, i've created container, following instructions, , exposing postgresql port 5432.

of course, can execute shell in container, doing

docker exec -it container_name /bin/bash 

after that, i'm logged postgres user. need install more software (basically, postgres related stuff, or command line tools).

edit: i'd need, example, install lsof tool (not available default in centos 7, can installed yum install lsof).

so, i'd need different user, able install software. unless...

i'm not doing things right way, , need another container monitorize postgresql. or use my host machine (mac os x) that. then... how use commands lsof, or htop? need in same container runs postgresql that.

am right?

ok, easy

docker exec -it -u root container_name /bin/bash -c "yum install lsof" 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -