comparison Dockerfile @ 748:75e87b7d37c0

Add dockerised setup for running the server.
author Tom Gottfried <tom@intevation.de>
date Tue, 27 Oct 2015 18:38:54 +0100
parents
children cb841ed21405
comparison
equal deleted inserted replaced
747:214508fd95e7 748:75e87b7d37c0
1 #
2 # Dockerfile for jboss wildfly application server cutomized for usage in the
3 # BfS-Lada project
4 #
5 # Build with e.g. `docker build --force-rm=true -t koala/lada_wildfly .'
6 # Run with e.g.
7 # `docker run --name lada_wildfly --link lada_db:lada_db
8 # -dp 8181:8080 -p 1818:9990 koala/lada_wildfly'
9 # The linked container may be created from db_schema/Dockerfile
10 #
11
12 FROM java:7-jdk
13 MAINTAINER raimund.renkert@intevation.de
14
15 #
16 # install packages
17 #
18 RUN apt-get update -y && \
19 apt-get install -y libpostgresql-jdbc-java libpostgis-java libjts-java \
20 maven
21
22 #
23 # Set up Wildfly
24 #
25 RUN mkdir /opt/jboss
26
27 RUN curl \
28 https://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz \
29 | tar zx && mv wildfly-8.2.1.Final /opt/jboss/wildfly
30
31 ENV JBOSS_HOME /opt/jboss/wildfly
32
33 RUN $JBOSS_HOME/bin/add-user.sh admin secret --silent
34
35 EXPOSE 8080 9990
36
37 #
38 # Add LADA-server repo
39 #
40 ADD . /usr/src/lada-server
41 WORKDIR /usr/src/lada-server
42
43 #
44 # Wildfly setup specific for LADA
45 #
46 RUN mkdir -p $JBOSS_HOME/modules/org/postgres/main
47 RUN ln -s /usr/share/java/postgresql-jdbc4-9.2.jar \
48 $JBOSS_HOME/modules/org/postgres/main/
49 RUN ln -s /usr/share/java/postgis-jdbc-2.1.4.jar \
50 $JBOSS_HOME/modules/org/postgres/main/
51 RUN ln -s /usr/share/java/jts-1.11.jar \
52 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/
53 RUN curl \
54 http://www.hibernatespatial.org/repository/org/hibernate/hibernate-spatial/4.3/hibernate-spatial-4.3.jar > \
55 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-spatial-4.3.jar
56
57 RUN cp wildfly/postgres-module.xml \
58 $JBOSS_HOME/modules/org/postgres/main/module.xml
59 RUN cp wildfly/hibernate-module.xml \
60 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml
61
62 RUN wildfly/execute.sh
63
64 RUN rm $JBOSS_HOME/standalone/configuration/standalone_xml_history/current/*
65
66 #
67 # Build and deploy LADA-server
68 #
69 RUN mvn clean compile package
70 RUN mv target/lada-server-2.2.0.war $JBOSS_HOME/standalone/deployments
71 RUN touch $JBOSS_HOME/standalone/deployments/lada-server.war.dodeploy
72
73 #
74 # This will boot WildFly in the standalone mode and bind to all interface
75 #
76 CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", \
77 "-bmanagement=0.0.0.0"]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)