diff --git a/.dockerignore b/.dockerignore index ff05716577d02f5e3706ca0807457d2cb63a0bc1..45c917cf0d91d9cff8af9554725a61116e2bb974 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,62 +1,5 @@ .gitlab-ci Dockerfile -README.md -LICENSE .dockerignore - -plugin.xml_gen -bin/ -target/ -tmp/ -.settings/ -MANIFEST.MF_gen -.DS_Store* -.metadata -runtimeInfo -workspace -*._trace -Thumbs.db -.Rhistory -.pydevproject -deps/ -diagrams/* -.idea -log/ -catalog-v*.xml -.RData -.Rproj.user -*.tar.gz -*.zip -*.gml - -# IntelliJ IDEA -*.iml - -# Eclipse -.project -.classpath - -### Gradle ### -.gradle -build/ - -# Ignore Gradle GUI config -gradle-app.setting - -# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) -!gradle-wrapper.jar - -# Cache of project -.gradletasknamecache - -hs_err_*.log -replay_*.log - -~*.* -*.~* - -xtend-gen/ -neo4j-server/ -out/ -*.swp -*.report +models +.git diff --git a/Dockerfile b/Dockerfile index dcaa6e442ae6bfee01f881cf0821e59b4f75ab1f..41c78bee0442b1b999c37959f64202618f7e3e1a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,11 @@ FROM ubuntu:latest USER root ENV DEBIAN_FRONTEND noninteractive +ENV HOME /home/user +RUN useradd --create-home --home-dir $HOME user \ + && chmod -R u+rwx $HOME \ + && chown -R user:user $HOME + RUN apt-get update -y && apt-get install -y \ openjdk-8-jdk \ r-base \ @@ -15,107 +20,16 @@ RUN apt-get update -y && apt-get install -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -RUN mkdir -p /trainbenchmark/trainbenchmark-reporting COPY trainbenchmark-reporting/install.R /trainbenchmark/trainbenchmark-reporting/install.R RUN Rscript /trainbenchmark/trainbenchmark-reporting/install.R -ENV HOME /home/user -RUN useradd --create-home --home-dir $HOME user \ - && chmod -R u+rwx $HOME \ - && chown -R user:user $HOME - WORKDIR /trainbenchmark -# START prefetch some gradle-dependencies -COPY gradlew . -COPY gradle gradle -COPY settings.gradle . -COPY build.gradle build.gradle -RUN chown user:user -R /trainbenchmark -USER user -RUN ./gradlew --no-daemon build; true +COPY --chown=user:user . . -# build.gradle -COPY trainbenchmark-reporting/build.gradle trainbenchmark-reporting/build.gradle -COPY trainbenchmark-scripts/build.gradle trainbenchmark-scripts/build.gradle -COPY trainbenchmark-server/build.gradle trainbenchmark-server/build.gradle -COPY trainbenchmark-tool-emf/build.gradle trainbenchmark-tool-emf/build.gradle -COPY trainbenchmark-tool-jastadd-namelookup-base/build.gradle trainbenchmark-tool-jastadd-namelookup-base/build.gradle -COPY trainbenchmark-tool-jastadd-namelookup-incremental/build.gradle trainbenchmark-tool-jastadd-namelookup-incremental/build.gradle -COPY trainbenchmark-tool-jastadd-namelookup/build.gradle trainbenchmark-tool-jastadd-namelookup/build.gradle -COPY trainbenchmark-tool-jastadd-optimized-base/build.gradle trainbenchmark-tool-jastadd-optimized-base/build.gradle -COPY trainbenchmark-tool-jastadd-optimized-incremental/build.gradle trainbenchmark-tool-jastadd-optimized-incremental/build.gradle -COPY trainbenchmark-tool-jastadd-optimized/build.gradle trainbenchmark-tool-jastadd-optimized/build.gradle -COPY trainbenchmark-tool-jastadd-specialized-base/build.gradle trainbenchmark-tool-jastadd-specialized-base/build.gradle -COPY trainbenchmark-tool-jastadd-specialized-incremental/build.gradle trainbenchmark-tool-jastadd-specialized-incremental/build.gradle -COPY trainbenchmark-tool-jastadd-specialized/build.gradle trainbenchmark-tool-jastadd-specialized/build.gradle -COPY trainbenchmark-tool-tinkergraph/build.gradle trainbenchmark-tool-tinkergraph/build.gradle -COPY trainbenchmark-tool-viatra-patterns/build.gradle trainbenchmark-tool-viatra-patterns/build.gradle -COPY trainbenchmark-tool-viatra/build.gradle trainbenchmark-tool-viatra/build.gradle -# properties -COPY trainbenchmark-format-emf-model/build.properties trainbenchmark-format-emf-model/build.properties -COPY trainbenchmark-tool-viatra-patterns/build.properties trainbenchmark-tool-viatra-patterns/build.properties -COPY trainbenchmark-tool/build.properties trainbenchmark-tool/build.properties -# core packages -COPY trainbenchmark-config/ trainbenchmark-config/ -COPY trainbenchmark-tool/ trainbenchmark-tool/ -COPY trainbenchmark-tool-jastadd-base/ trainbenchmark-tool-jastadd-base/ -COPY trainbenchmark-format-emf-model/ trainbenchmark-format-emf-model/ -COPY trainbenchmark-format-emf/ trainbenchmark-format-emf/ -COPY trainbenchmark-generator-dot/ trainbenchmark-generator-dot/ -COPY trainbenchmark-generator-emf/ trainbenchmark-generator-emf/ -COPY trainbenchmark-generator-graph-tinkerpop/ trainbenchmark-generator-graph-tinkerpop/ -COPY trainbenchmark-generator-json4ag-special/ trainbenchmark-generator-json4ag-special/ -COPY trainbenchmark-generator-json4ag/ trainbenchmark-generator-json4ag/ -COPY trainbenchmark-generator/ trainbenchmark-generator/ - -RUN ./gradlew --no-daemon initScripts -RUN ./gradlew --no-daemon trainbenchmark-config:build; true -RUN ./gradlew --no-daemon trainbenchmark-tool:build; true - -# END prefetch some gradle-dependencies - -COPY diagrams/ diagrams/ -COPY logs/ logs/ -COPY models/ models/ -COPY results/ results/ -COPY trainbenchmark-config/ trainbenchmark-config/ -COPY trainbenchmark-format-emf/ trainbenchmark-format-emf/ -COPY trainbenchmark-format-emf-model/ trainbenchmark-format-emf-model/ -COPY trainbenchmark-generator/ trainbenchmark-generator/ -COPY trainbenchmark-generator-dot/ trainbenchmark-generator-dot/ -COPY trainbenchmark-generator-emf/ trainbenchmark-generator-emf/ -COPY trainbenchmark-generator-graph-tinkerpop/ trainbenchmark-generator-graph-tinkerpop/ -COPY trainbenchmark-generator-json4ag/ trainbenchmark-generator-json4ag/ -COPY trainbenchmark-generator-json4ag-special/ trainbenchmark-generator-json4ag-special/ -COPY trainbenchmark-reporting/ trainbenchmark-reporting/ -COPY trainbenchmark-scripts/ trainbenchmark-scripts/ -COPY trainbenchmark-server/ trainbenchmark-server/ -COPY trainbenchmark-tool/ trainbenchmark-tool/ -COPY trainbenchmark-tool-emf/ trainbenchmark-tool-emf/ -COPY trainbenchmark-tool-jastadd-base/ trainbenchmark-tool-jastadd-base/ -COPY trainbenchmark-tool-jastadd-namelookup/ trainbenchmark-tool-jastadd-namelookup/ -COPY trainbenchmark-tool-jastadd-namelookup-base/ trainbenchmark-tool-jastadd-namelookup-base/ -COPY trainbenchmark-tool-jastadd-namelookup-incremental/ trainbenchmark-tool-jastadd-namelookup-incremental/ -COPY trainbenchmark-tool-jastadd-optimized/ trainbenchmark-tool-jastadd-optimized/ -COPY trainbenchmark-tool-jastadd-optimized-base/ trainbenchmark-tool-jastadd-optimized-base/ -COPY trainbenchmark-tool-jastadd-optimized-incremental/ trainbenchmark-tool-jastadd-optimized-incremental/ -COPY trainbenchmark-tool-jastadd-specialized/ trainbenchmark-tool-jastadd-specialized/ -COPY trainbenchmark-tool-jastadd-specialized-base/ trainbenchmark-tool-jastadd-specialized-base/ -COPY trainbenchmark-tool-jastadd-specialized-incremental/ trainbenchmark-tool-jastadd-specialized-incremental/ -COPY trainbenchmark-tool-tinkergraph/ trainbenchmark-tool-tinkergraph/ -COPY trainbenchmark-tool-viatra/ trainbenchmark-tool-viatra/ -COPY trainbenchmark-tool-viatra-patterns/ trainbenchmark-tool-viatra-patterns/ -COPY visualization/ visualization/ - - -USER root -RUN chown -R user:user /trainbenchmark -USER user - -RUN ./gradlew --no-daemon initScripts RUN ./gradlew --no-daemon preprocess RUN ./gradlew --no-daemon build shadowJar -x test +RUN ./gradlew --no-daemon initScripts # when benchmarking run: # RUN ./gradlew --no-daemon generate