Skip to content

Commit

Permalink
trying with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
smarianimore committed Nov 5, 2020
1 parent b416336 commit fe901a9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM adoptopenjdk/maven-openjdk11

ENV MAVEN_OPTS -Xms64m -Xmx128m

RUN mkdir -p /usr/local/src/mvnapp
WORKDIR /usr/local/src/mvnapp
ADD . /usr/local/src/mvnapp

RUN mvn --settings settings.xml -Dmaven.test.skip=true clean install dependency:copy-dependencies

WORKDIR /usr/local/src/mvnapp
RUN chmod +x run.sh


CMD ./run.sh it.unimore.dipi.openness.producer.services.AppService

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>it.unimore.dipi</groupId>
<artifactId>openness-connector</artifactId>
<version>0.0.4</version>
<version>0.0.5</version>
<type>jar</type>
</dependency>

Expand Down
10 changes: 10 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# Build Classpath
export CLASSPATH="./target/classes"
for file in `ls target/*.jar` ; do export CLASSPATH=$CLASSPATH':'./target/$file; done
for file in `ls target/dependency` ; do export CLASSPATH=$CLASSPATH':'./target/dependency/$file; done

# Pass all arguments to java run
java -classpath $CLASSPATH "$@"

0 comments on commit fe901a9

Please sign in to comment.