Skip to content
Snippets Groups Projects
Verified Commit d208eac0 authored by David Beniamine's avatar David Beniamine
Browse files

Two stages docker build that creates unl2rdf jar

parent 2b2bbbb7
No related branches found
No related tags found
No related merge requests found
FROM debian:buster FROM debian:buster As base
RUN apt-get update RUN apt-get update
RUN apt-get -y upgrade RUN apt-get -y upgrade
RUN apt-get update RUN apt-get update
FROM base As builder
ARG GIT_VERSION=1-project-creation
RUN apt-get install -y \
apache2 \
git \
maven \
openjdk-11-jdk
WORKDIR /opt
RUN git clone https://gitlab.tetras-libre.fr/unl/unl2rdf
WORKDIR /opt/unl2rdf
RUN git checkout $GIT_VERSION
RUN mvn package
FROM base
RUN apt-get install -y \ RUN apt-get install -y \
apache2 \ apache2 \
graphviz \
libapache2-mod-wsgi-py3 \ libapache2-mod-wsgi-py3 \
openjdk-11-jre \
python-dev \ python-dev \
python3-pip python3-pip
...@@ -19,7 +44,11 @@ RUN a2dissite 000-default ...@@ -19,7 +44,11 @@ RUN a2dissite 000-default
RUN a2ensite flask RUN a2ensite flask
COPY --from=builder /opt/unl2rdf/target/*.jar /opt/
# Force code reloading # Force code reloading
RUN sed -i 's/^\(\s*MaxConnectionsPerChild\s*\) 0/\1 1/g' /etc/apache2/mods-enabled/mpm_event.conf RUN sed -i 's/^\(\s*MaxConnectionsPerChild\s*\) 0/\1 1/g' /etc/apache2/mods-enabled/mpm_event.conf
WORKDIR /var/www/app/app
ENTRYPOINT ["apache2ctl", "-DFOREGROUND"] ENTRYPOINT ["apache2ctl", "-DFOREGROUND"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment