vertx-web-scala.dockerfile 980 B

12345678910111213141516171819202122232425262728293031323334
  1. FROM openjdk:11-jdk
  2. ARG SBT_VERSION=1.2.8
  3. RUN \
  4. curl -L -o sbt-$SBT_VERSION.deb https://dl.bintray.com/sbt/debian/sbt-$SBT_VERSION.deb && \
  5. dpkg -i sbt-$SBT_VERSION.deb && \
  6. rm sbt-$SBT_VERSION.deb && \
  7. apt-get update && \
  8. apt-get install sbt && \
  9. sbt sbtVersion
  10. WORKDIR /vertx
  11. COPY src src
  12. COPY project project
  13. COPY build.sbt build.sbt
  14. RUN sbt assembly
  15. CMD export DBIP=`getent hosts tfb-database | awk '{ print $1 }'` && \
  16. sed -i "s|tfb-database|$DBIP|g" /vertx/src/main/conf/config.json && \
  17. java \
  18. -Xms2G \
  19. -Xmx2G \
  20. -server \
  21. -Dvertx.disableMetrics=true \
  22. -Dvertx.disableH2c=true \
  23. -Dvertx.disableWebsockets=true \
  24. -Dvertx.flashPolicyHandler=false \
  25. -Dvertx.threadChecks=false \
  26. -Dvertx.disableContextTimings=true \
  27. -Dvertx.disableTCCL=true \
  28. -Dvertx.disableHttpHeadersValidation=true \
  29. -jar \
  30. target/scala-2.12/vertx-web-scala-assembly-1.jar \
  31. src/main/conf/config.json