Mercurial > lada > lada-server
comparison Dockerfile @ 753:5f6037a281fe
merged.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 30 Oct 2015 15:08:08 +0100 |
parents | 6a24f01bdaac |
children | 4f9b5500541c |
comparison
equal
deleted
inserted
replaced
752:0cf9387c8da2 | 753:5f6037a281fe |
---|---|
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 # The LADA-server will be available under | |
12 # http://yourdockerhost:8181/lada-server-2.2.0 | |
13 # | |
14 | |
15 FROM java:7-jdk | |
16 MAINTAINER raimund.renkert@intevation.de | |
17 | |
18 # | |
19 # install packages | |
20 # | |
21 RUN apt-get update -y && \ | |
22 apt-get install -y libpostgresql-jdbc-java libpostgis-java libjts-java \ | |
23 maven | |
24 | |
25 # | |
26 # Set up Wildfly | |
27 # | |
28 RUN mkdir /opt/jboss | |
29 | |
30 RUN curl \ | |
31 https://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz \ | |
32 | tar zx && mv wildfly-8.2.1.Final /opt/jboss/wildfly | |
33 | |
34 ENV JBOSS_HOME /opt/jboss/wildfly | |
35 | |
36 RUN $JBOSS_HOME/bin/add-user.sh admin secret --silent | |
37 | |
38 EXPOSE 8080 9990 | |
39 | |
40 # | |
41 # Add LADA-server repo | |
42 # | |
43 ADD . /usr/src/lada-server | |
44 WORKDIR /usr/src/lada-server | |
45 | |
46 # | |
47 # Wildfly setup specific for LADA | |
48 # | |
49 RUN mkdir -p $JBOSS_HOME/modules/org/postgres/main | |
50 RUN ln -s /usr/share/java/postgresql-jdbc4-9.2.jar \ | |
51 $JBOSS_HOME/modules/org/postgres/main/ | |
52 RUN ln -s /usr/share/java/postgis-jdbc-2.1.4.jar \ | |
53 $JBOSS_HOME/modules/org/postgres/main/ | |
54 RUN ln -s /usr/share/java/jts-1.11.jar \ | |
55 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/ | |
56 RUN curl \ | |
57 http://www.hibernatespatial.org/repository/org/hibernate/hibernate-spatial/4.3/hibernate-spatial-4.3.jar > \ | |
58 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-spatial-4.3.jar | |
59 | |
60 RUN cp wildfly/postgres-module.xml \ | |
61 $JBOSS_HOME/modules/org/postgres/main/module.xml | |
62 RUN cp wildfly/hibernate-module.xml \ | |
63 $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml | |
64 | |
65 RUN wildfly/execute.sh | |
66 | |
67 RUN rm $JBOSS_HOME/standalone/configuration/standalone_xml_history/current/* | |
68 | |
69 # | |
70 # Build and deploy LADA-server | |
71 # | |
72 RUN mvn clean compile package | |
73 RUN mv target/lada-server-2.2.0.war $JBOSS_HOME/standalone/deployments | |
74 RUN touch $JBOSS_HOME/standalone/deployments/lada-server-2.2.0.war.dodeploy | |
75 | |
76 # | |
77 # This will boot WildFly in the standalone mode and bind to all interface | |
78 # | |
79 CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", \ | |
80 "-bmanagement=0.0.0.0"] |