view Dockerfile @ 782:322ce4d7cc3a

Mention timezone setting in install docs.
author Tom Gottfried <tom@intevation.de>
date Fri, 13 Nov 2015 15:57:14 +0100
parents 625c8ae7fc30
children c19bd80d1f62
line wrap: on
line source
#
# Dockerfile for jboss wildfly application server cutomized for usage in the
# BfS-Lada project
#
# Build with e.g. `docker build --force-rm=true -t koala/lada_wildfly .'
# Run with e.g.
# `docker run --name lada_wildfly --link lada_db:lada_db
#            -dp 8181:8080 -p 1818:9990 koala/lada_wildfly'
# The linked container may be created from db_schema/Dockerfile.
#
# The LADA-server will be available under
# http://yourdockerhost:8181/lada-server-2.2.0
#

FROM java:7-jdk
MAINTAINER raimund.renkert@intevation.de

#
# install packages
#
RUN apt-get update -y && \
    apt-get install -y libpostgis-java libjts-java \
            maven

#
# Set up Wildfly
#
RUN mkdir /opt/jboss

RUN curl \
    https://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.tar.gz \
    | tar zx && mv wildfly-8.2.1.Final /opt/jboss/wildfly

ENV JBOSS_HOME /opt/jboss/wildfly

RUN $JBOSS_HOME/bin/add-user.sh admin secret --silent

EXPOSE 8080 9990

#
# Add LADA-server repo
#
ADD . /usr/src/lada-server
WORKDIR /usr/src/lada-server

#
# Wildfly setup specific for LADA
#
RUN mkdir -p $JBOSS_HOME/modules/org/postgres/main

RUN curl https://jdbc.postgresql.org/download/postgresql-9.4-1204.jdbc41.jar >\
         $JBOSS_HOME/modules/org/postgres/main/postgresql-9.4-1204.jdbc41.jar

RUN ln -s /usr/share/java/postgis-jdbc-2.1.4.jar \
       $JBOSS_HOME/modules/org/postgres/main/
RUN ln -s /usr/share/java/jts-1.11.jar \
       $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/

RUN curl \
    http://www.hibernatespatial.org/repository/org/hibernate/hibernate-spatial/4.3/hibernate-spatial-4.3.jar > \
    $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/hibernate-spatial-4.3.jar

RUN ln -s $PWD/wildfly/postgres-module.xml \
       $JBOSS_HOME/modules/org/postgres/main/module.xml
RUN ln -fs $PWD/wildfly/hibernate-module.xml \
       $JBOSS_HOME/modules/system/layers/base/org/hibernate/main/module.xml
RUN ln -s $PWD/wildfly/standalone.conf $JBOSS_HOME/bin/

RUN wildfly/execute.sh

RUN rm $JBOSS_HOME/standalone/configuration/standalone_xml_history/current/*

#
# Build and deploy LADA-server
#
RUN mvn clean compile package
RUN mv target/lada-server-2.2.0.war $JBOSS_HOME/standalone/deployments
RUN touch $JBOSS_HOME/standalone/deployments/lada-server-2.2.0.war.dodeploy

#
# This will boot WildFly in the standalone mode and bind to all interface
#
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", \
     "-bmanagement=0.0.0.0"]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)