tom@748: # tom@748: # Dockerfile for jboss wildfly application server cutomized for usage in the tom@748: # BfS-Lada project tom@748: # tom@748: # Build with e.g. `docker build --force-rm=true -t koala/lada_wildfly .' tom@748: # Run with e.g. tom@748: # `docker run --name lada_wildfly --link lada_db:lada_db tom@748: # -dp 8181:8080 -p 1818:9990 koala/lada_wildfly' tom@749: # The linked container may be created from db_schema/Dockerfile. tom@749: # tom@749: # The LADA-server will be available under tom@749: # http://yourdockerhost:8181/lada-server-2.2.0 tom@748: # tom@748: tom@748: FROM java:7-jdk tom@748: MAINTAINER raimund.renkert@intevation.de tom@748: tom@748: # tom@748: # install packages tom@748: # tom@748: RUN apt-get update -y && \ tom@748: apt-get install -y libpostgresql-jdbc-java libpostgis-java libjts-java \ tom@748: maven tom@748: tom@748: # tom@748: # Set up Wildfly tom@748: # tom@748: RUN mkdir /opt/jboss tom@748: tom@748: RUN curl \ tom@748: https://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz \ tom@748: | tar zx && mv wildfly-8.2.1.Final /opt/jboss/wildfly tom@748: tom@748: ENV JBOSS_HOME /opt/jboss/wildfly tom@748: tom@748: RUN $JBOSS_HOME/bin/add-user.sh admin secret --silent tom@748: tom@748: EXPOSE 8080 9990 tom@748: tom@748: # tom@748: # Add LADA-server repo tom@748: # tom@748: ADD . /usr/src/lada-server tom@748: WORKDIR /usr/src/lada-server tom@748: tom@748: # tom@748: # Wildfly setup specific for LADA tom@748: # tom@748: RUN mkdir -p $JBOSS_HOME/modules/org/postgres/main tom@748: RUN ln -s /usr/share/java/postgresql-jdbc4-9.2.jar \ tom@748: $JBOSS_HOME/modules/org/postgres/main/ tom@748: RUN ln -s /usr/share/java/postgis-jdbc-2.1.4.jar \ tom@748: $JBOSS_HOME/modules/org/postgres/main/ tom@748: RUN ln -s /usr/share/java/jts-1.11.jar \ tom@748: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/ tom@748: RUN curl \ tom@748: http://www.hibernatespatial.org/repository/org/hibernate/hibernate-spatial/4.3/hibernate-spatial-4.3.jar > \ tom@748: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-spatial-4.3.jar tom@748: tom@748: RUN cp wildfly/postgres-module.xml \ tom@748: $JBOSS_HOME/modules/org/postgres/main/module.xml tom@748: RUN cp wildfly/hibernate-module.xml \ tom@748: $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml tom@748: tom@748: RUN wildfly/execute.sh tom@748: tom@748: RUN rm $JBOSS_HOME/standalone/configuration/standalone_xml_history/current/* tom@748: tom@748: # tom@748: # Build and deploy LADA-server tom@748: # tom@748: RUN mvn clean compile package tom@748: RUN mv target/lada-server-2.2.0.war $JBOSS_HOME/standalone/deployments tom@750: RUN touch $JBOSS_HOME/standalone/deployments/lada-server-2.2.0.war.dodeploy tom@748: tom@748: # tom@748: # This will boot WildFly in the standalone mode and bind to all interface tom@748: # tom@748: CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", \ tom@748: "-bmanagement=0.0.0.0"]