-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
33 lines (20 loc) · 1011 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
# Build
FROM ubuntu:16.04 as builder
WORKDIR /
RUN apt-get update
RUN apt-get -y install apt-transport-https
RUN echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
RUN apt-get update
RUN apt-get -y install openjdk-8-jre sbt jq postgresql-client-9.5 wget curl zip time
ADD . /
RUN /bin/bash src/main/script/run.sh
# Run
FROM openjdk:8-jre
WORKDIR /
COPY --from=builder /indexDir /indexDir
COPY --from=builder /gnaf-search/target/scala-2.11/gnaf-search_2.11-1.1-SNAPSHOT-one-jar.jar /gnaf-search/target/scala-2.11/gnaf-search_2.11-1.1-SNAPSHOT-one-jar.jar
EXPOSE 9040
CMD ["java", "-jar", "/gnaf-search/target/scala-2.11/gnaf-search_2.11-1.1-SNAPSHOT-one-jar.jar"]