forked from ISTI-ansible-roles/ansible-roles
24 lines
1.3 KiB
Docker
24 lines
1.3 KiB
Docker
from openjdk:7
|
|
|
|
ENV GHN_HOME=/SmartGears-Bundle/
|
|
ENV BUNDLE_HOME=$GHN_HOME
|
|
ENV CATALINA_HOME=$GHN_HOME/tomcat/
|
|
ENV CATALINA_OPTS="-Xmx2000m -Xms2000m -XX:MaxPermSize=512M"
|
|
ENV CATALINA_PID=$CATALINA_HOME/pid.txt
|
|
|
|
RUN wget http://maven.research-infrastructures.eu/nexus/service/local/repositories/{{ repo }}/content/org/gcube/distribution/smartgears-distribution-bundle/{{ smartgears_version }}/smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz
|
|
RUN tar xzvf smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz
|
|
RUN rm smartgears-distribution-bundle-{{ smartgears_version }}.tar.gz
|
|
WORKDIR $GHN_HOME/
|
|
RUN echo 1 | /bin/bash $GHN_HOME/setup.sh -n {{ ansible_hostname }} -f
|
|
ADD d4s.authorization $CATALINA_HOME/lib/
|
|
RUN ln -s $GHN_HOME/SmartGears/container.xml $GHN_HOME/container.xml
|
|
RUN sed -ie 's/^$CATALINA_HOME\/bin\/startup.sh/$CATALINA_HOME\/bin\/catalina.sh\ run/' $GHN_HOME/startContainer.sh
|
|
RUN sed -ie "s/<container mode='offline'>/<container mode='{{ container_mode }}'>/" $GHN_HOME/container.xml
|
|
RUN sed -ie "s/<infrastructure>gcube<\/infrastructure>/<infrastructure>{{ infrastructure }}<\/infrastructure>/" $GHN_HOME/container.xml
|
|
RUN sed -ie "/<\/infrastructure>/a \ <token>{{ token }}</token>" $GHN_HOME/container.xml
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ./startContainer.sh
|