diff --git a/Dockerfile b/Dockerfile index 0322531..3e65457 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,19 @@ FROM openmodelica/openmodelica:v1.12.0 -RUN apt-get update && apt-get install -y openjdk-8-jre + +RUN wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz +RUN tar xfvz /tmp/openjdk.tar.gz --directory /opt &&\ + /opt/jdk-11.0.2/bin/java -version + +RUN useradd -ms /bin/bash openmodelica +RUN mkdir -p /home/openmodelica/data &&\ + chown -R openmodelica:openmodelica /home/openmodelica ADD ./target/scala-2.12/mope-server-*.jar /opt -RUN mv /opt/mope-server-*.jar /opt/mope-server.jar +RUN mv /opt/mope-server-*.jar /opt/mope-server.jar &&\ + chmod 777 /opt/mope-server.jar + +USER openmodelica EXPOSE 3000 -CMD java -jar /opt/mope-server.jar --interface='0.0.0.0' --port=3000 +CMD /opt/jdk-11.0.2/bin/java -jar /opt/mope-server.jar --interface='0.0.0.0' --port=3000 diff --git a/project/Dependencies.scala b/project/Dependencies.scala index afd6ea2..e75b792 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -6,8 +6,12 @@ object Dependencies { def fromGithub(url:String) = RootProject(uri(url)) def fromFile(url:String) = RootProject(file(url)) def omcApi(snapshot:Boolean=false) = - if(snapshot) "com.github.THM-MoTE" % "omc-java-api" % "master-SNAPSHOT" - else "de.thm.mni.mote" % "omc-java-api" % "0.3.5" + if(snapshot) Seq( + "org.antlr" % "antlr4-runtime" % "4.5.3", + "org.apache.commons" % "commons-lang3" % "3.5", + "org.zeromq" % "jeromq" % "0.4.3" + ) + else Seq("de.thm.mni.mote" % "omc-java-api" % "0.3.5") val jitpack = "jitpack" at "https://jitpack.io" @@ -34,8 +38,7 @@ object Dependencies { private val scalaUtilsVersion = "1.0.6" private val scalaUtilsGroup = "org.scala-lang.modules" - val utils = Seq( - omcApi(false), + val utils = omcApi(true) ++ Seq( scalaUtilsGroup %% "scala-parser-combinators" % scalaUtilsVersion, "org.rogach" %% "scallop" % "3.1.1" )