improving performance and image size
This commit is contained in:
parent
87debe6b2b
commit
4d0b523d6a
68
Dockerfile
68
Dockerfile
|
@ -2,20 +2,24 @@ FROM ubuntu:16.04
|
||||||
|
|
||||||
MAINTAINER Julien Fastré <julienfastre@cvfe.be>
|
MAINTAINER Julien Fastré <julienfastre@cvfe.be>
|
||||||
|
|
||||||
ARG version=3.1.4
|
ARG version=3.1.5
|
||||||
|
|
||||||
|
WORKDIR /tmp/build
|
||||||
|
|
||||||
# download SOPE sources
|
# download SOPE sources
|
||||||
WORKDIR /tmp/src/sope
|
ADD https://github.com/inverse-inc/sope/archive/SOPE-${version}.tar.gz /tmp/src/sope/sope.tar.gz
|
||||||
ADD https://github.com/inverse-inc/sope/archive/SOPE-${version}.tar.gz .
|
|
||||||
RUN tar -xf SOPE-${version}.tar.gz && mkdir /tmp/SOPE && mv sope-SOPE-${version}/* /tmp/SOPE/.
|
|
||||||
|
|
||||||
# download sogo sources
|
# download sogo sources
|
||||||
WORKDIR /tmp/src/SOGo
|
ADD https://github.com/inverse-inc/sogo/archive/SOGo-${version}.tar.gz /tmp/src/SOGo/SOGo.tar.gz
|
||||||
ADD https://github.com/inverse-inc/sogo/archive/SOGo-${version}.tar.gz .
|
|
||||||
RUN tar -xf SOGo-${version}.tar.gz && mkdir /tmp/SOGo && mv sogo-SOGo-${version}/* /tmp/SOGo/.
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
# prepare & compile
|
||||||
apt-get install -qy --no-install-recommends \
|
RUN echo "untar SOPE sources" \
|
||||||
|
&& tar -xf /tmp/src/sope/sope.tar.gz && mkdir /tmp/SOPE && mv sope-SOPE-${version}/* /tmp/SOPE/. \
|
||||||
|
&& echo "untar SOGO sources" \
|
||||||
|
&& tar -xf /tmp/src/SOGo/SOGo.tar.gz && mkdir /tmp/SOGo && mv sogo-SOGo-${version}/* /tmp/SOGo/. \
|
||||||
|
&& echo "install required packages" \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -qy --no-install-recommends \
|
||||||
gnustep-make \
|
gnustep-make \
|
||||||
gnustep-base-common \
|
gnustep-base-common \
|
||||||
libgnustep-base-dev \
|
libgnustep-base-dev \
|
||||||
|
@ -26,33 +30,25 @@ RUN apt-get update && \
|
||||||
libldap2-dev \
|
libldap2-dev \
|
||||||
postgresql-server-dev-9.5 \
|
postgresql-server-dev-9.5 \
|
||||||
libmemcached-dev \
|
libmemcached-dev \
|
||||||
libcurl4-openssl-dev
|
libcurl4-openssl-dev \
|
||||||
|
&& echo "compiling sope & sogo" \
|
||||||
|
&& cd /tmp/SOPE \
|
||||||
|
&& ./configure --with-gnustep --enable-debug --disable-strip \
|
||||||
# compiling sope & sogo
|
&& make \
|
||||||
RUN cd /tmp/SOPE && \
|
&& make install \
|
||||||
./configure --with-gnustep --enable-debug --disable-strip && \
|
&& cd /tmp/SOGo \
|
||||||
make && \
|
&& ./configure --enable-debug --disable-strip \
|
||||||
make install && \
|
&& make \
|
||||||
cd /tmp/SOGo && \
|
&& make install \
|
||||||
./configure --enable-debug --disable-strip && \
|
&& echo "register sogo library" \
|
||||||
make && \
|
&& echo "/usr/local/lib/sogo" > /etc/ld.so.conf.d/sogo.conf \
|
||||||
make install
|
&& ldconfig \
|
||||||
|
&& echo "create user sogo" \
|
||||||
|
&& groupadd --system sogo && useradd --system --gid sogo sogo \
|
||||||
# register sogo library
|
&& echo "create directories and enforce permissions" \
|
||||||
RUN echo "/usr/local/lib/sogo" > /etc/ld.so.conf.d/sogo.conf && \
|
&& install -o sogo -g sogo -m 755 -d /var/run/sogo \
|
||||||
ldconfig
|
&& install -o sogo -g sogo -m 750 -d /var/spool/sogo \
|
||||||
|
&& install -o sogo -g sogo -m 750 -d /var/log/sogo
|
||||||
# create sogo user
|
|
||||||
RUN groupadd --system sogo && useradd --system --gid sogo sogo
|
|
||||||
|
|
||||||
# create directories
|
|
||||||
# Enforce directory existence and permissions
|
|
||||||
RUN install -o sogo -g sogo -m 755 -d /var/run/sogo && \
|
|
||||||
install -o sogo -g sogo -m 750 -d /var/spool/sogo && \
|
|
||||||
install -o sogo -g sogo -m 750 -d /var/log/sogo
|
|
||||||
|
|
||||||
# add sogo.conf
|
# add sogo.conf
|
||||||
ADD sogo.default.conf /etc/sogo/sogo.conf
|
ADD sogo.default.conf /etc/sogo/sogo.conf
|
||||||
|
|
Loading…
Reference in a new issue