Search This Blog

Saturday, August 2, 2014

Geoserver 2.5.2 Dockerfile

This geoserver dockerfile also requires the Oracle JDK tar.gz reside in the Dockerfile context.

#
# example Dockerfile for Geoserver 2.5.2
#

FROM ubuntu:14.04
MAINTAINER championofcyrodiil@blogger.com

#JDK
RUN mkdir /opt/java
ADD jdk-7u60-linux-x64.tar.gz /opt/java
#Line below commented out because docker auto extracts a tar.gz when ADDed above
#RUN tar -C /opt/java -xf /opt/java/jdk-7u60-linux-x64.tar.gz
ENV JAVA_HOME /opt/java/jdk1.7.0_60
ENV PATH $PATH:$JAVA_HOME/bin

#Geoserver, wget or put the zip in the Dockerfile folder.
#ADD geoserver-2.5.2-bin.zip /opt/
RUN wget -P /opt/ http://sourceforge.net/projects/geoserver/files/GeoServer/2.5.2/geoserver-2.5.2-bin.zip
RUN unzip -d /opt/ /opt/geoserver-2.5.2-bin.zip
ENV GEOSERVER_HOME /opt/geoserver-2.5.2/
RUN chmod -R 755 /opt/geoserver-2.5.2

EXPOSE 8080
CMD ["/opt/geoserver-2.5.2/bin/startup.sh"]


No comments:

Post a Comment