Running simple Kotlin Ktor app in docker container with PostgresSql database Running simple Kotlin Ktor app in docker container with PostgresSql database docker docker

Running simple Kotlin Ktor app in docker container with PostgresSql database


First problem:I started using host name instead IP adress so now I'm using postgres instead 172.20.0.6. And the rest of it is connected to second problem

Second problem:

The issue was that I was starting the app during build phase of container.

Instead RUN ./gradlew run I used

RUN gradle buildENTRYPOINT ["gradle","run"]

Also I noticed that I don't have to use gradle wrapper while I'm using FROM gradle:6.7-jdk8

Now everyting is working fine.