-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstrabon.docker
124 lines (90 loc) · 3.36 KB
/
strabon.docker
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
############################
# Dockerfile for RK-suite #
# RK-team #
# Madgik #
# DI @ UoA #
# #
# java7 #
# maven 3.0.5 #
# git 1.9.1 #
# tomcat 8.0.23 #
# postgres 9.4 #
# postgis 2.3 #
# #
# Sextant #
# Strabon #
# Ontop-spatial #
# GeoTriples #
# madIS #
############################
FROM ubuntu:14.04
MAINTAINER Giorgos Argyriou <[email protected]>
ENV PORT 8080
ENV TOMCAT_MAJOR_VERSION 8
ENV TOMCAT_MINOR_VERSION 8.0.23
# INSTALL PREREQUISITIES
RUN apt-get update \
&& apt-get install -y \
wget \
default-jdk \
python-apsw \
curl \
git \
mercurial \
maven \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# DOWNLOAD AND INSTALL postgres AND postgis
RUN touch /etc/apt/sources.list.d/pgdg.list \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN apt-get update \
&& apt-get install -y \
postgresql-9.4 \
postgresql-server-dev-9.4 \
postgresql-9.4-postgis-2.3 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD initdb.sh enable_remote.sh /usr/local/bin/
RUN chmod -v +x /usr/local/bin/initdb.sh
RUN chown -v postgres:postgres /usr/local/bin/initdb.sh
RUN chmod -v +x /usr/local/bin/enable_remote.sh
USER postgres
## start postgres, add postgis, create template for strabon and stop postgres
RUN initdb.sh
USER root
# INSTALL TOMCAT
RUN wget -q https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_MINOR_VERSION}/bin/apache-tomcat-${TOMCAT_MINOR_VERSION}.tar.gz \
&& wget -qO- https://archive.apache.org/dist/tomcat/tomcat-${TOMCAT_MAJOR_VERSION}/v${TOMCAT_MINOR_VERSION}/bin/apache-tomcat-${TOMCAT_MINOR_VERSION}.tar.gz.md5 | md5sum -c - \
&& tar zxf apache-tomcat-*.tar.gz \
&& rm apache-tomcat-*.tar.gz \
&& mv apache-tomcat* tomcat
# DOWNLOAD geotriples
RUN wget http://geotriples.di.uoa.gr/downloads/geotriples-1.1.6-bin.zip \
&& unzip geotriples-1.1.6-bin.zip \
&& rm -rf /geotriples-1.1.6-bin.zip
# DOWNLOAD madIS
RUN git clone https://github.com/madgik/madis.git
# DOWNLOAD AND BUILD strabon
RUN hg clone http://hg.strabon.di.uoa.gr/Strabon/ \
&& cd Strabon \
&& mvn clean package
RUN cp /Strabon/endpoint/target/strabon-endpoint-3.3.2-SNAPSHOT.war /tomcat/webapps/Strabon.war
#\
# && rm -rf /Strabon
# DOWNLOAD AND BUILD ontop-spatial
RUN git clone https://github.com/ConstantB/Ontop-spatial-example.git \
&& cp /Ontop-spatial-example/ontop-spatial-precompiled/webapp/QuestSesame/openrdf-* /tomcat/webapps \
&& rm -rf /Ontop-spatial-example
# DOWNLOAD AND BUILD sextant
RUN hg clone http://hg.strabon.di.uoa.gr/Sextant-New -r OL3 \
&& cd Sextant-New/JerseyServer \
&& mvn clean package
RUN cp /Sextant-New/JerseyServer/target/*.war /tomcat/webapps/Sextant_v2.0.war \
&& rm -Rf /Sextant-New
# FINAL CONFIGURATIONS
RUN mkdir /inout
ADD rocket.sh /usr/local/bin/
RUN chmod -v +x /usr/local/bin/rocket.sh
EXPOSE $PORT
CMD enable_remote.sh && su - postgres -c "/usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c config_file=/etc/postgresql/9.4/main/postgresql.conf"