Note to self: PlayFramework disable IPv6

To make sure that your Play! Application binds on an IPv4 Socket in your Docker-Container, add the following to your build.sbt file

javaOptions in Universal ++= Seq( // docker
....
  "-Djava.net.preferIPv4Stack=true"
)
javaOptions in run += "-Djava.net.preferIPv4Stack=true" // dev mode

when running locally, you can also start sbt and tell it to prefer the IPv4 Stack.

sbt -J-Djava.net.preferIPv4Stack=true

Leave a comment

Your email address will not be published. Required fields are marked *