diff --git a/build.sbt b/build.sbt index 8d2b82b..df31b65 100644 --- a/build.sbt +++ b/build.sbt @@ -26,7 +26,6 @@ libraryDependencies += "com.github.scopt" %% "scopt" % "4.0.1" // Coverage -coverageEnabled := true coverageMinimumStmtTotal := 70 coverageFailOnMinimum := false coverageHighlighting := true diff --git a/docker/Dockerfile b/docker/Dockerfile index 1e58f6a..bd6dc0b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -3,11 +3,9 @@ FROM openjdk:jdk-bullseye LABEL author="Olivier Filangi" LABEL mail="olivier.filangi@inrae.fr" -ARG BRANCH=main +ARG BRANCH=develop ARG REPOSITORY_URL=https://github.com/p2m2/p2m2tools.git -USER root - # install sbt:https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html RUN apt update &&\ @@ -22,8 +20,13 @@ RUN apt update &&\ RUN git clone ${REPOSITORY_URL} /p2m2tools_repo WORKDIR /p2m2tools_repo -RUN git checkout ${BRANCH} && sbt assembly -COPY p2m2tools . -ENTRYPOINT [ "./p2m2tools" ] +RUN git checkout ${BRANCH} && sbt coverageOff assembly + +COPY p2m2tools /usr/bin/ + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + + + diff --git a/docker/p2m2tools b/docker/p2m2tools index 635b2e9..05bdf72 100755 --- a/docker/p2m2tools +++ b/docker/p2m2tools @@ -6,8 +6,8 @@ if [ $# -eq 0 ] exit 1 fi - -JAR=$(find $PWD/assembly -name "*.jar") +# Directory inside Dockerfile should correspond to /p2m2tools_repo directory +JAR=$(find /p2m2tools_repo/assembly -name "*.jar") java -cp $JAR $*