Docker Community Forums

Share and learn in the Docker community.

Share one docker image among multiple docker-compose

Hi all,
I have a question regarding ‘sharing’ one docker image among multiple docker-compose files. What I want to achieve is to have one shared volume with PostgreSql where all my DBs used by various images and composes would be shared. Is this proper way to do it (if possible) or there is a better pattern?

Maybe I shall create one docker-compose containing e.g. Nginx, Postgresql and some other tools that can be used by other via sockets?

Thank you kindly.

Best regards