Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/docker #161

Open
wants to merge 4 commits into
base: development1_0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
.gitignore
.dockerignore
README.md
TODO.txt
provconvert*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ target/
.classpath
*.classpath
*.DS_Store
provconvert*.zip
55 changes: 55 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
FROM maven:3.6-jdk-11-slim

RUN apt-get update && apt-get -y install graphviz man rpm python rubygems make && gem install json-ld

WORKDIR /src

COPY pom.xml /src/

COPY modules-core/pom.xml /src/modules-core/
COPY modules-core/prov-model-scala/pom.xml /src/modules-core/prov-model-scala/
COPY modules-core/prov-model/pom.xml /src/modules-core/prov-model/
COPY modules-core/prov-jsonld-xml/pom.xml /src/modules-core/prov-jsonld-xml/

COPY modules-misc/pom.xml /src/modules-misc/
COPY modules-misc/prov-dot/pom.xml /src/modules-misc/prov-dot/
COPY modules-misc/prov-generator/pom.xml /src/modules-misc/prov-generator/

COPY modules-legacy/pom.xml /src/modules-legacy/
COPY modules-legacy/prov-json/pom.xml /src/modules-legacy/prov-json/
COPY modules-legacy/prov-xml/pom.xml /src/modules-legacy/prov-xml/
COPY modules-legacy/roundtrip/pom.xml /src/modules-legacy/roundtrip/
COPY modules-legacy/prov-n/pom.xml /src/modules-legacy/prov-n/
COPY modules-legacy/prov-sql/pom.xml /src/modules-legacy/prov-sql/
COPY modules-legacy/prov-rdf/pom.xml /src/modules-legacy/prov-rdf/

COPY modules-template/pom.xml /src/modules-template/
COPY modules-template/prov-template/pom.xml /src/modules-template/prov-template/
COPY modules-template/prov-template-compiler/pom.xml /src/modules-template/prov-template-compiler/

COPY modules-executable/pom.xml /src/modules-executable/
COPY modules-executable/prov-interop/pom.xml /src/modules-executable/prov-interop/
COPY modules-executable/toolbox/pom.xml /src/modules-executable/toolbox/

COPY modules-tutorial/pom.xml /src/modules-tutorial/pom.xml
COPY modules-tutorial/tutorial1/pom.xml /src/modules-tutorial/tutorial1/pom.xml
COPY modules-tutorial/tutorial2/pom.xml /src/modules-tutorial/tutorial2/pom.xml
COPY modules-tutorial/tutorial3/pom.xml /src/modules-tutorial/tutorial3/pom.xml
COPY modules-tutorial/tutorial4/pom.xml /src/modules-tutorial/tutorial4/pom.xml
COPY modules-tutorial/tutorial5/pom.xml /src/modules-tutorial/tutorial5/pom.xml
COPY modules-tutorial/tutorial6/pom.xml /src/modules-tutorial/tutorial6/pom.xml

COPY modules-services/pom.xml /src/modules-services/pom.xml
COPY modules-services/prov-service-translation/pom.xml /src/modules-services/prov-service-translation/pom.xml
COPY modules-services/prov-service-core/pom.xml /src/modules-services/prov-service-core/pom.xml
COPY modules-services/service-translator/pom.xml /src/modules-services/service-translator/pom.xml
COPY modules-services/prov-log/pom.xml /src/modules-services/prov-log/pom.xml
COPY modules-services/docker-service-translator/pom.xml /src/modules-services/docker-service-translator/pom.xml

RUN mvn dependency:go-offline --fail-never

COPY . /src

RUN sed -i '/docker-service-translator/d' modules-services/pom.xml
RUN mvn -f pom.xml package

9 changes: 9 additions & 0 deletions Makefile-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build:
docker build -t provtoolboxbuild .

extract:
docker run --name extract --rm provtoolboxbuild sleep 1000 &
sleep 1
FILE=$$(docker exec extract sh -c 'ls /src/modules-executable/toolbox/target/provconvert-*-release.zip'|tail -1) ;\
docker cp extract:$$FILE .
docker kill extract