-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
aportosa
committed
Sep 5, 2016
1 parent
be36d98
commit 769a919
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM java:7 | ||
|
||
ENV SPAGOBI_VERSION=All-in-One-SpagoBI-5.1-1feb2d97af | ||
ENV SPAGOBI_URL=https://github.com/SpagoBILabs/SpagoBI/releases/download/fiware-v5.1-1feb2d97af/${SPAGOBI_VERSION}.zip | ||
ENV SPAGOBI_MYSQL_SCRIPT_URL=https://github.com/SpagoBILabs/SpagoBI/releases/download/fiware-v5.1-1feb2d97af/MySQL.zip | ||
|
||
RUN apt-get update && apt-get install -y wget coreutils unzip mysql-client | ||
|
||
#download spagobi all in one and extract it | ||
WORKDIR /home | ||
RUN wget "${SPAGOBI_URL}" -O SpagoBI.zip && \ | ||
unzip SpagoBI.zip && \ | ||
mv ${SPAGOBI_VERSION} SpagoBI && \ | ||
rm SpagoBI.zip | ||
|
||
#download mysql scripts | ||
RUN wget "${SPAGOBI_MYSQL_SCRIPT_URL}" -O MySQL.zip && \ | ||
unzip MySQL.zip -d MySQL && \ | ||
rm MySQL.zip | ||
|
||
ENV SPAGOBI_DIRECTORY /home/SpagoBI | ||
ENV MYSQL_SCRIPT_DIRECTORY /home/MySQL | ||
WORKDIR ${SPAGOBI_DIRECTORY}/bin | ||
|
||
#make the script executable by bash (not only sh) and | ||
#make spagobi running forever without exiting | ||
RUN sed -i "s/bin\/sh/bin\/bash/" startup.sh && \ | ||
sed -i "s/EXECUTABLE\" start/EXECUTABLE\" run/" startup.sh | ||
|
||
COPY ./entrypoint.sh ./ | ||
#make all scripts executable | ||
RUN chmod +x *.sh | ||
|
||
#safe copy of original conf files | ||
RUN cp ${SPAGOBI_DIRECTORY}/conf/server.xml ${SPAGOBI_DIRECTORY}/conf/server.xml.bak && \ | ||
cp ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/hibernate.cfg.xml ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/hibernate.cfg.xml.bak && \ | ||
cp ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/jbpm.hibernate.cfg.xml ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/jbpm.hibernate.cfg.xml.bak && \ | ||
cp ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/quartz.properties ${SPAGOBI_DIRECTORY}/webapps/SpagoBI/WEB-INF/classes/quartz.properties.bak | ||
|
||
#where the data is stored in all in one run | ||
VOLUME ${SPAGOBI_DIRECTORY}/database | ||
|
||
EXPOSE 8080 | ||
#-d option is passed to run spagobi forever without exiting from container | ||
ENTRYPOINT ["./entrypoint.sh"] | ||
CMD ["./startup.sh"] |