Note to self: PlayFramework disable IPv6

5 Apr
2017

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 modeCode language: JavaScript (javascript)

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

sbt -J-Djava.net.preferIPv4Stack=trueCode language: Bash (bash)

Comment Form

top