Containerize Python-Postgres client

I am quite new to docker and I was wondering how should I approach containerizing my client that I built:

Now, I got as far as building a docker Ubuntu image with Python and Postgres with pulled repository (but am having issues getting the jdbc port exposed), but I believe this isn't a right way of using Docker. Should I create two seperate containers for Python and Postgres each and link them? Where would I pull my code to and run in that case?

Any help is appreciated and thanks for looking.

submitted by /u/EggShellBuddyPal
[link] [comments]
Source: Reddit