-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
49 lines (38 loc) · 1.4 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
# Oracle Java 8 Dockerfile
#
# https://github.com/dockerfile/java
# https://github.com/dockerfile/java/tree/master/oracle-java8
#
# Pull base image.
FROM ubuntu:16.04
ARG species=all
ENV JAVA_OPTS ""
RUN apt-get -y update && apt-get install -y software-properties-common python-software-properties
# Install Java.
RUN \
echo oracle-java8-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 && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# Define working directory.
WORKDIR /data
ADD owlsim-services/target/owlsim-services-3.0-SNAPSHOT.jar /data/
#ADD configuration-samples/configuration-all.yaml /data/configuration.yaml
ADD scripts/golr-exporter.py /data/golr-exporter.py
ADD scripts/configuration-generator.py /data/configuration-generator.py
RUN apt-get -y update && apt-get install python3-pip -y
RUN pip3 install pyyaml requests
RUN if [ $species = "all" ]; \
then \
cd /data && python3 golr-exporter.py; \
else \
cd /data && python3 golr-exporter.py -t $species; \
fi
RUN cd /data && python3 configuration-generator.py
CMD java $JAVA_OPTS -jar /data/owlsim-services-3.0-SNAPSHOT.jar server /data/configuration.yaml
EXPOSE 8080