forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (25 loc) · 1009 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ubuntu:18.04
RUN \
apt-get update && \
apt-get install -y software-properties-common zip curl && \
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer
RUN rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/oracle-jdk8-installer
RUN curl -o /maven.tar.gz http://ftp.halifax.rwth-aachen.de/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz && \
mkdir /maven && \
cd /maven && \
tar -xvf /maven.tar.gz && \
rm /maven.tar.gz
ADD pom.xml /app/
ADD annot/pom.xml /app/annot/
ADD core/pom.xml /app/core/
ADD distribution/pom.xml /app/distribution/
WORKDIR /app
RUN if [ -d .m2 ] ; then mv .m2 /root ; fi
# fake maven run to pre-cache a few maven dependencies
RUN /maven/apache-maven-*/bin/mvn install ; exit 0
ADD . /app
ENV MAVEN_OPTS="-XX:MaxPermSize=128m"
RUN /maven/apache-maven-*/bin/mvn install