Skip to content
Snippets Groups Projects
Commit 1d7ee7e7 authored by Vincent Massol's avatar Vincent Massol Committed by GitHub
Browse files

Merge pull request #3 from zwindler/clear_apt

Dockerfile optimisations (docker image size)
parents 6c234442 56220d1b
No related branches found
No related tags found
No related merge requests found
......@@ -32,19 +32,25 @@ ENV XWIKI_VERSION=8.4.4 \
RUN echo "deb http://http.debian.net/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list && \
apt-get update && \
apt-get -y upgrade && \
apt-get -y --force-yes install \
apt-get --no-install-recommends -y --force-yes install \
curl \
libreoffice \
nano \
openjdk-8-jdk \
sudo \
tomcat8 \
unzip
unzip && \
rm -rf /var/lib/apt/lists/*
# Install XWiki as the ROOT webapp context in Tomcat
# Create the Tomcat temporary directory
# Configure the XWiki permanent directory
RUN rm -rf /var/lib/tomcat8/webapps/* && \
mkdir -p /var/lib/tomcat8/temp && \
mkdir -p /var/lib/xwiki && \
curl -L "http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-${XWIKI_VERSION}.war" -o xwiki.war && \
unzip -d /var/lib/tomcat8/webapps/ROOT xwiki.war && \
chown -R tomcat8:tomcat8 /var/lib/tomcat8 /var/lib/xwiki && \
rm -f xwiki.war
# Download the MySQL JDBC driver and install it in the XWiki webapp
......@@ -58,24 +64,14 @@ RUN curl -L https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java
# Configure Tomcat. For example set the memory for the Tomcat JVM since the default value is too small for XWiki
COPY tomcat/setenv.sh /usr/share/tomcat8/bin/
# Create the Tomcat temporary directory
RUN mkdir -p /var/lib/tomcat8/temp
# Setup the XWiki Hibernate configuration
COPY xwiki/hibernate.cfg.xml /var/lib/tomcat8/webapps/ROOT/WEB-INF/hibernate.cfg.xml
# Configure the XWiki permanent directory
RUN mkdir -p /var/lib/xwiki
# Set a specific distribution id in XWiki for this docker packaging.
RUN sed "s/<id>org.xwiki.enterprise:xwiki-enterprise-web/<id>org.xwiki.enterprise:xwiki-enterprise-docker/" \
< /var/lib/tomcat8/webapps/ROOT/META-INF/extension.xed > /var/lib/tomcat8/webapps/ROOT/META-INF/extension2.xed && \
mv /var/lib/tomcat8/webapps/ROOT/META-INF/extension2.xed /var/lib/tomcat8/webapps/ROOT/META-INF/extension.xed
# Set ownership and permission to the tomcat8 user
RUN chown -R tomcat8:tomcat8 /var/lib/xwiki
RUN chown -R tomcat8:tomcat8 /var/lib/tomcat8
# Add scripts required to make changes to XWiki configuration files at execution time
COPY xwiki/xwiki-config-replace.sh /usr/local/bin/xwiki-config-replace.sh
COPY xwiki/xwiki-set-cfg /usr/local/bin/xwiki-set-cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.