Skip to content
Snippets Groups Projects
Verified Commit 04eda89f authored by egon w. stemle's avatar egon w. stemle :robot:
Browse files

Rm convenience apps for debug purposes

parent 069f1dc6
No related branches found
No related tags found
No related merge requests found
##############################################################################
# Dockerfile to build LINDAT Dspace container images
# Based on Ubuntu
##############################################################################
ARG UBUNTU_VERSION=16.04
FROM gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/dspace-app/2020.02.1:1.0 as dspace-app
FROM ubuntu:$UBUNTU_VERSION
ARG UBUNTU_VERSION
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL author="Alexander König <Alexander.Koenig@eurac.edu>, \
Egon W. Stemle <egon.stemle@eurac.edu>"
LABEL maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"
ENV TOMCAT_VERSION="8.0.53"
ENV TOMCAT_SHA512="cd8a4e48a629a2f2bb4ce6b101ebcce41da52b506064396ec1b2915c0b0d8d82123091242f2929a649bcd8b65ecf6cd1ab9c7d90ac0e261821097ab6fbe22df9 *apache-tomcat-8.0.53.tar.gz"
# https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz.sha512
ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
RUN apt-get update && \
apt-get upgrade && \
rm -rf /var/lib/apt/lists/*
# install cpanm and dependencies
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get update && apt-get install \
unzip curl wget git \
make gcc \
cpanminus \
openjdk-8-jdk ant maven libxml2-utils xsltproc \
libapr1-dev && \
rm -rf /var/lib/apt/lists/*
RUN cpanm -n File::Spec::Functions && \
cpanm Term::ReadLine
# set up a proper locale
RUN apt-get update && apt-get install locales && rm -rf /var/lib/apt/lists/*
RUN locale-gen en_US.UTF-8
COPY 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
### Install Tomcat
#
# build tomcat $TOMCAT_VERSION (> 8.0.35), version recommended by LINDAT
RUN wget -O /tmp/apache-tomcat-$TOMCAT_VERSION.tar.gz \
https://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz
WORKDIR /tmp
# checksum check the download
RUN echo "$TOMCAT_SHA512" > /tmp/apache-tomcat.sha512 && \
sha512sum --check apache-tomcat.sha512
RUN mkdir /opt/tomcat8 && \
tar xzf /tmp/apache-tomcat-$TOMCAT_VERSION.tar.gz \
-C /opt/tomcat8/ \
--strip-components=1 && \
groupadd tomcat8 && \
useradd -s /bin/false -g tomcat8 -d /opt/tomcat8/ tomcat8 && \
chown -R tomcat8:tomcat8 /opt/tomcat8
# Install Apache Tomcat Native
# prerequisites: libopenssl, libapr1, jdk
RUN mkdir /opt/tomcat8/bin/tomcat-native && \
tar xzf /opt/tomcat8/bin/tomcat-native.tar.gz \
-C /opt/tomcat8/bin/tomcat-native \
--strip-components=1 && \
cd /opt/tomcat8/bin/tomcat-native/native && \
./configure \
--with-java-home=/usr/lib/jvm/java-8-openjdk-amd64/ \
--prefix=/usr/local/ && \
make && make install
# copy config files etc. (setenv.sh,server.xml)
COPY commul-customization/tomcat-setenv.sh /opt/tomcat8/bin/setenv.sh
COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
### Install Dspace
COPY --from=dspace-app /app /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
# install python modules: magic dateutil, lxml
RUN apt-get update && apt-get install \
python-magic python-dateutil python-lxml && \
rm -rf /var/lib/apt/lists/*
# 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
# deploy DSpace
RUN make new_deploy
# DEBUG: to be able to access tomcat manager through browser
# COPY commul-customization/tomcat-users.xml /opt/tomcat8/conf/
# adapt some config files
RUN perl -pi -e 's/#useProxies = true/useProxies = true/' /opt/lindat-dspace/installation/config/dspace.cfg
RUN perl -pi -e 's# (?s).*org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe.*# (?s).*org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe.*,\\\n (?s).*user-agent=.kube-probe.*#' /opt/lindat-dspace/installation/config/modules/lr.cfg
# set up handle server
COPY commul-customization/hdl-setup.tmp /tmp/
RUN cat /tmp/hdl-setup.tmp | /opt/lindat-dspace/installation/bin/dspace make-handle-config /opt/lindat-dspace/installation/handle-server/
COPY commul-customization/config.dct /opt/lindat-dspace/installation/handle-server/config.dct
RUN cp /opt/repository/workspace/config/etc/default/handle-server /etc/default/
RUN cp /opt/repository/workspace/config/etc/init.d/handle-server /etc/init.d/
RUN chmod +x /etc/init.d/handle-server
RUN perl -pi -e 's#DSPACE_INSTALLATION_DIRECTORY=#DSPACE_INSTALLATION_DIRECTORY=/opt/lindat-dspace/installation#' /etc/default/handle-server
# Install ping for livenessProbe
RUN apt-get update && apt-get install iputils-ping && rm -rf /var/lib/apt/lists/*
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version="$LABEL_VERSION"
LABEL org.label-schema.build-date="$LABEL_BUILD_DATE"
LABEL org.label-schema.vcs-url="$LABEL_VCS_URL"
# copy entrypoint script and start
COPY commul-customization/entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod u+x /usr/bin/entrypoint.sh
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
......@@ -30,12 +30,6 @@ RUN cpanm Term::ReadLine
RUN apt-get update \
&& apt-get install ant curl libxml2-utils maven openjdk-8-jdk unzip xsltproc yui-compressor
# install convenience apps for debug purposes (vim and jsbeautifier)
RUN apt-get update && apt-get install vim less python-pip
RUN pip install --upgrade "pip < 21.0"
RUN pip install jsbeautifier
COPY jsbeautifier___init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/__init__.py
# set up a proper locale
RUN apt-get update && apt-get install locales
RUN locale-gen en_US.UTF-8
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment