Docker REST API Golang

Hey guys i’m a new to docker, and i don’t understand how to install my Golang application that have a routes, controller, and database config to Docker,after I searched on the internet, all I found was how to run 1 main.go file only, do i need to make route image, controller image, and database image to make my application run on docker?? or just make main.go image in docker to access all ?? sorry for my bad grammar.. i hope you guys understand what i’m talking about appriciate your help

Source: Docker Questions