############################################################ # Dockerfile to build LINDAT Dspace container images # Based on Ubuntu ############################################################ FROM ubuntu LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" # install cpanm and dependencies RUN apt-get update &&\ apt-get -y upgrade &&\ apt-get -y install make gcc wget cpanminus RUN cpanm File::Spec::Functions RUN cpanm Term::ReadLine # install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget RUN apt-get -y install openjdk-8-jdk ant maven libxml2-utils xsltproc unzip curl git # install convenience apps for debug purposes (vim and jsbeautifier) RUN apt-get -y install vim less python-pip RUN pip install --upgrade pip RUN pip install jsbeautifier COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/ # set up a proper locale RUN apt-get -y install locales RUN locale-gen en_US.UTF-8 COPY commul-customization/default_locale /etc/default/locale RUN chmod 0755 /etc/default/locale ENV LC_ALL=en_US.UTF-8 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US.UTF-8 # build tomcat 8.0.35, version recommended by LINDAT RUN wget -O /tmp/apache-tomcat-8.0.35.tar.gz https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.35/bin/apache-tomcat-8.0.35.tar.gz RUN mkdir /opt/tomcat8 RUN tar xvzf /tmp/apache-tomcat-8.0.35.tar.gz -C /opt/tomcat8/ --strip-components=1 RUN groupadd tomcat8 RUN useradd -s /bin/false -g tomcat8 -d /opt/tomcat8/ tomcat8 # change permissions RUN chown -R tomcat8:tomcat8 /opt/tomcat8 # copy config files etc. (init script,catalina.sh,setenv.sh,server.xml COPY commul-customization/tomcat8 /etc/init.d/ RUN chmod a+x /etc/init.d/tomcat8 COPY commul-customization/catalina.sh /opt/tomcat8/bin/ COPY commul-customization/setenv.sh /opt/tomcat8/bin/ COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml # install Dspace RUN git clone https://github.com/commul/clarin-dspace.git -b clarin /opt/repository/sources/dspace WORKDIR /opt/repository/sources/dspace/utilities/project_helpers RUN ./setup.sh /opt/repository/workspace COPY commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile # copy over configs and startup scripts COPY commul-customization/start_stack.sh /opt/repository/workspace/scripts/ COPY commul-customization/stop_stack.sh /opt/repository/workspace/scripts/ COPY commul-customization/local.properties /opt/repository/workspace/sources/ RUN chmod u+x /opt/repository/workspace/scripts/*_stack.sh # install libs WORKDIR /opt/repository/workspace/scripts RUN make install_libs # copy over config files COPY commul-customization/aai_config.js /tmp/ CMD tail -f /opt/repository/sources/dspace/dspace-api/src/test/data/dspaceFolder/log/dspace.log