-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docker-from-uberjar util folder
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# IMPORTANT: This dockerfile is merely a fallback! | ||
# The recommended way to build a docker image from this java project is using the jib maven plugin | ||
# on the module lsq-pkg-docker-cli: | ||
# mvn clean install | ||
# mvn -pl :lsq-pkg-docker-cli jib:dockerBuild | ||
|
||
# Building this Dockerfile requires buildkit: | ||
# Ensure { "features": { "buildkit": true } } exists in /etc/docker/daemon.json | ||
# (or wherever your deamon.json resides) | ||
|
||
ARG home="/lsq" | ||
|
||
# Final running image | ||
FROM openjdk:11-jre-slim | ||
ARG home | ||
ENV HOME "$home" | ||
# Import the lsq-cli jar from the build step | ||
ADD lsq-pkg-uberjar-cli-*-jar-with-dependencies.jar "$HOME/lsq-cli.jar" | ||
|
||
# Using /data as working directory that will be shared with host for input/output files | ||
WORKDIR /data | ||
VOLUME [ "/data" ] | ||
|
||
ENTRYPOINT ["java","-jar","$HOME/lsq-cli.jar"] | ||
CMD ["-h"] | ||
|
||
# Usage: | ||
# docker run -it -v $(pwd):/data ghcr.io/aksw/lsq rx rdfize --endpoint=http://dbpedia.org/sparql virtuoso.dbpedia.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Helper docker file to build the image from an uberjar and thus avoid a full build. | ||
|
||
For example, this git repository might be checked out on a remote server with only docker available. | ||
In this case, the lsq jar could be built locally and copied to the remote server using `scp`. | ||
|
||
The filename must match the pattern: `lsq-pkg-uberjar-cli-*-jar-with-dependencies.jar` | ||
This is also the file generated when running `make distjar` on the project root. | ||
|
||
Once the uberjar is present, run `docker build .` to build the image. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
# In the project root, run "make distjar" to build the uberjar | ||
|
||
cp ../lsq-pkg-parent/lsq-pkg-uberjar-cli/target/lsq-pkg-uberjar-cli-*-jar-with-dependencies.jar . | ||
|