How can create docker image of postgresql?

I have an issue with CMD or ENTRYPOINT? What should I write inside of it to make it running in background?

For tomcat server at the end used CMD [“/opt/tomcat/bin/catalina.sh”,“run”] used that catalina.sh? Where it is found?

@linuxwasi, You can refer to this documentation as an example.