Created
October 23, 2024 07:04
-
-
Save msukanen/45143b20c52505cacf6a8665ce0bf861 to your computer and use it in GitHub Desktop.
docker + ktor + jib -- JDK-21 and how to sort out port setting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ktor { | |
docker { | |
jreVersion.set(JavaVersion.VERSION_21) | |
portMappings.set(listOf( | |
io.ktor.plugin.features.DockerPortMapping( | |
15551, 15551, | |
io.ktor.plugin.features.DockerPortMappingProtocol.TCP | |
) | |
)) | |
} | |
} | |
jib { | |
from { | |
image = "eclipse-temurin:21-jdk-alpine" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is, if your app wants to listen to port 15551. Docker/ktor by default gives 8080 if not told otherwise.