-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (37 loc) · 1.97 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
50
51
52
53
54
55
56
57
58
FROM dockerfile/java
MAINTAINER [email protected]
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN apt-get install -y unzip
## for dev only
#ADD ./resources/wisemapping-v3.0.2.zip /root/wisemapping-v3.0.2.zip
ADD https://bitbucket.org/wisemapping/wisemapping-open-source/downloads/wisemapping-v3.0.2.zip /root/wisemapping-v3.0.2.zip
RUN cd /root && unzip wisemapping-v3.0.2.zip && rm wisemapping-v3.0.2.zip
ADD http://jdbc.postgresql.org/download/postgresql-9.1-903.jdbc4.jar /root/wisemapping-v3.0.2/lib/postgresql-9.1-903.jdbc4.jar
#ADD ./resources/postgresql-9.1-903.jdbc4.jar /root/wisemapping-v3.0.2/webapps/wisemapping/WEB-INF/lib/postgresql-9.1-903.jdbc4.jar
ADD ./resources/app.properties /root/wisemapping-v3.0.2/webapps/wisemapping/WEB-INF/app.properties
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update
# Install the latest postgresql
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes postgresql-9.3 && \
/etc/init.d/postgresql stop
# Install other tools.
RUN DEBIAN_FRONTEND=noninteractive && \
apt-get install -y pwgen inotify-tools
# Decouple our data from our container.
VOLUME ["/data"]
# Cofigure the database to use our data dir.
RUN sed -i -e"s/data_directory =.*$/data_directory = '\/data'/" /etc/postgresql/9.3/main/postgresql.conf
# Allow connections from anywhere.
RUN sed -i -e"s/^#listen_addresses =.*$/listen_addresses = '*'/" /etc/postgresql/9.3/main/postgresql.conf
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
EXPOSE 8080
ADD /resources/scripts /scripts
RUN chmod +x /scripts/start.sh
RUN touch /firstrun
#ENTRYPOINT ["/scripts/start.sh"]
CMD /bin/bash