Skip to content

Commit

Permalink
Setup docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
drallieiv committed Apr 28, 2021
1 parent 1a116e9 commit 339aae1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 5 additions & 2 deletions KinanCity-core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ VOLUME ["/opt/data"]
RUN apt-get update && apt-get install -y --no-install-recommends curl wget && rm -rf /var/lib/apt/lists/*

# Download last KinanCity core jar
RUN curl -s https://api.github.com/repos/drallieiv/KinanCity/releases | grep "browser_download_url" | grep "KinanCity-core" | grep "jar" | head -n 1 | cut -d '"' -f 4 | xargs wget -O KinanCity-core.jar
RUN curl -s https://api.github.com/repos/drallieiv/KinanCity/releases/latest | grep "browser_download_url" | grep "kinancity-core" | head -n 1 | cut -d '"' -f 4 | xargs wget -O kinancity-core.jar

ENTRYPOINT ["java" "-jar KinanCity-core.jar -o /opt/data/result.csv"]
COPY scripts/run.sh /run.sh
RUN chmod +x /run.sh

ENTRYPOINT ["/run.sh"]
2 changes: 2 additions & 0 deletions KinanCity-core/scripts/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
java -jar kinancity-core.jar -o /opt/data/result.csv
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ private static Options setupCliOptions() {
options.addOption(CliOptions.CK.asOption());
options.addOption(CliOptions.CP.asOption());

// Output File
options.addOption(CliOptions.OUTPUT.asOption());

// Number of Threads
options.addOption(CliOptions.NB_THREADS.asOption());

Expand Down

0 comments on commit 339aae1

Please sign in to comment.