Skip to content

Commit

Permalink
update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
yvrng committed Jun 28, 2017
1 parent 078fad0 commit bcc0e55
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -64,6 +64,7 @@
**/.idea/
**/*.iml
**/*.iws
**/*.eml

### NetBeans

Expand Down
23 changes: 14 additions & 9 deletions Dockerfile
Expand Up @@ -13,15 +13,17 @@
# USAGE:
#
# docker build -t neoemf .
# docker run -it neoemf /bin/bash
# java -jar benchmarks.jar [options]
# docker run -v {LOCAL_DIR}:/root/ws neoemf [parameters] init
# docker run -v {LOCAL_DIR}:/root/ws neoemf [parameters] [options]
#

FROM debian:latest

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_TERSE true
ENV WS src

# The default base directory for storing models
ENV NEOEMF_HOME /root/ws

WORKDIR /root

Expand All @@ -38,7 +40,7 @@ RUN apt-get update -qq \
&& echo 'oracle-java8-installer shared/accepted-oracle-license-v1-1 select true' | /usr/bin/debconf-set-selections \

# Install JDK8 & build tool
&& apt-get install -q --no-install-recommends -y \
&& apt-get install -q --no-install-recommends -y --allow-unauthenticated \
oracle-java8-installer \
oracle-java8-set-default \
maven \
Expand All @@ -47,16 +49,19 @@ RUN apt-get update -qq \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Copy the project
ADD . $WS
ADD . src

# Build the main project
RUN mvn -B install -DskipTests -Dmaven.javadoc.skip=true -f $WS/pom.xml
RUN mvn -B install -DskipTests -Dmaven.javadoc.skip=true -f src/pom.xml

# Build benchmarks
RUN mvn -B package -DskipTests -Dmaven.javadoc.skip=true -f $WS/benchmarks/pom.xml
RUN mvn -B package -DskipTests -Dmaven.javadoc.skip=true -f src/benchmarks/pom.xml

# Move the resulting artifacts
RUN mv -f $WS/benchmarks/core/target/exec/* . \
RUN mv -f src/benchmarks/core/target/exec/* . \

# Remove build files
&& rm -rf $WS .m2 /tmp/* /var/tmp/*
&& rm -rf src .m2 /tmp/* /var/tmp/*

CMD ["-help"]
ENTRYPOINT ["java", "-jar", "benchmarks.jar"]
1 change: 1 addition & 0 deletions examples/fr.inria.atlanmod.neoemf.tutorial/.gitignore
@@ -1 +1,2 @@
database/*
databases/*

0 comments on commit bcc0e55

Please sign in to comment.