docker file improved with container.ini that can be changed coping it in
etc dir inside the container
This commit is contained in:
parent
90dca7b0f1
commit
ef3ac3784f
|
@ -5,8 +5,13 @@ FROM tomcat:9.0.48-jdk8-openjdk-buster
|
||||||
COPY ./target/$filename.tar.gz /smartgears-distro.tar.gz
|
COPY ./target/$filename.tar.gz /smartgears-distro.tar.gz
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
RUN tar zxvf /smartgears-distro.tar.gz
|
RUN tar zxvf /smartgears-distro.tar.gz
|
||||||
|
RUN rm /smartgears-distro.tar.gz
|
||||||
RUN export CATALINA_HOME=/usr/local/tomcat
|
RUN export CATALINA_HOME=/usr/local/tomcat
|
||||||
RUN ln -s /usr/local/tomcat tomcat
|
RUN ln -s /usr/local/tomcat tomcat
|
||||||
RUN mv smartgears-distribution-$version smartgears-distribution
|
RUN mv smartgears-distribution-$version smartgears-distribution
|
||||||
ENV GHN_HOME=./smartgears-distribution
|
ENV GHN_HOME=./smartgears-distribution
|
||||||
RUN ./smartgears-distribution/install -s tomcat
|
RUN ./smartgears-distribution/install -s tomcat
|
||||||
|
COPY startContainer.sh /startContainer.sh
|
||||||
|
RUN chmod +x /startContainer.sh
|
||||||
|
ENTRYPOINT ["/startContainer.sh"]
|
||||||
|
CMD ["catalina.sh","run"]
|
|
@ -1,41 +0,0 @@
|
||||||
<container mode='offline'>
|
|
||||||
|
|
||||||
<hostname>localhost</hostname>
|
|
||||||
<port>8080</port>
|
|
||||||
<infrastructure>gcube</infrastructure>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Add container tokens generated via portal for this host and port.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<token>token1</token>
|
|
||||||
<token>token2</token>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<!--
|
|
||||||
this tag enables authorize calls to this container also on VRE belonging to start tokens
|
|
||||||
-->
|
|
||||||
<!-- <authorizeChildrenContext>true</authorizeChildrenContext> -->
|
|
||||||
|
|
||||||
<site>
|
|
||||||
<country>it</country>
|
|
||||||
<location>rome</location>
|
|
||||||
<latitude>41.9000</latitude>
|
|
||||||
<longitude>12.5000</longitude>
|
|
||||||
</site>
|
|
||||||
|
|
||||||
<property name='SmartGearsDistribution' value='${project.version}' />
|
|
||||||
<property name='SmartGearsDistributionBundle' value='UnBundled' />
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Add your own property value here. This values will be published on
|
|
||||||
GHN porfile in /Profile/GHNDescription/RunTimeEnv/ tag.
|
|
||||||
-->
|
|
||||||
<!--
|
|
||||||
<property name='prop1' value='val1' />
|
|
||||||
<property name='prop2' value='val2' />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<publication-frequency>60</publication-frequency>
|
|
||||||
|
|
||||||
</container>
|
|
6
pom.xml
6
pom.xml
|
@ -96,12 +96,6 @@
|
||||||
<version>[2.0.0,3.0.0-SNAPSHOT)</version>
|
<version>[2.0.0,3.0.0-SNAPSHOT)</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
</dependency> -->
|
</dependency> -->
|
||||||
<dependency>
|
|
||||||
<groupId>org.gcube.core</groupId>
|
|
||||||
<artifactId>smartgears-management</artifactId>
|
|
||||||
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
|
|
||||||
<type>war</type>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
logs=/etc/logback.xml
|
||||||
|
container=/etc/container.ini
|
||||||
|
if [ -f "$logs" ]; then
|
||||||
|
cp $logs /tomcat/lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$container" ]; then
|
||||||
|
cp $container /smartgears-distribution
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue