2016-08-05 15:26:34 +02:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
|
|
|
MAINTAINER Julien Fastré <julienfastre@cvfe.be>
|
|
|
|
|
2016-12-12 08:54:29 +01:00
|
|
|
ARG version=2.3.18
|
2016-09-09 16:34:30 +02:00
|
|
|
|
|
|
|
WORKDIR /tmp/build
|
2016-08-05 15:26:34 +02:00
|
|
|
|
|
|
|
# download SOPE sources
|
2016-09-09 16:34:30 +02:00
|
|
|
ADD https://github.com/inverse-inc/sope/archive/SOPE-${version}.tar.gz /tmp/src/sope/sope.tar.gz
|
2016-08-05 15:26:34 +02:00
|
|
|
|
|
|
|
# download sogo sources
|
2016-09-09 16:34:30 +02:00
|
|
|
ADD https://github.com/inverse-inc/sogo/archive/SOGo-${version}.tar.gz /tmp/src/SOGo/SOGo.tar.gz
|
2016-08-05 15:26:34 +02:00
|
|
|
|
2016-09-09 16:34:30 +02:00
|
|
|
# prepare & compile
|
|
|
|
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 \
|
2016-08-05 15:26:34 +02:00
|
|
|
gnustep-make \
|
|
|
|
gnustep-base-common \
|
|
|
|
libgnustep-base-dev \
|
|
|
|
make \
|
|
|
|
gobjc \
|
|
|
|
libxml2-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libldap2-dev \
|
|
|
|
postgresql-server-dev-9.5 \
|
|
|
|
libmemcached-dev \
|
2016-09-09 16:34:30 +02:00
|
|
|
libcurl4-openssl-dev \
|
|
|
|
&& echo "compiling sope & sogo" \
|
|
|
|
&& cd /tmp/SOPE \
|
|
|
|
&& ./configure --with-gnustep --enable-debug --disable-strip \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& cd /tmp/SOGo \
|
|
|
|
&& ./configure --enable-debug --disable-strip \
|
|
|
|
&& make \
|
|
|
|
&& make install \
|
|
|
|
&& echo "register sogo library" \
|
|
|
|
&& echo "/usr/local/lib/sogo" > /etc/ld.so.conf.d/sogo.conf \
|
|
|
|
&& ldconfig \
|
|
|
|
&& echo "create user sogo" \
|
|
|
|
&& groupadd --system sogo && useradd --system --gid sogo sogo \
|
|
|
|
&& echo "create directories and enforce permissions" \
|
|
|
|
&& 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
|
2016-08-05 15:26:34 +02:00
|
|
|
|
|
|
|
# add sogo.conf
|
|
|
|
ADD sogo.default.conf /etc/sogo/sogo.conf
|
|
|
|
|
2016-10-28 14:14:09 +02:00
|
|
|
VOLUME /usr/local/lib/GNUstep/SOGo/WebServerResources
|
|
|
|
|
2016-08-05 15:26:34 +02:00
|
|
|
EXPOSE 20000
|
|
|
|
|
|
|
|
USER sogo
|
|
|
|
|
|
|
|
# load env
|
|
|
|
RUN . /usr/share/GNUstep/Makefiles/GNUstep.sh
|
|
|
|
|
2016-09-09 16:01:08 +02:00
|
|
|
CMD [ "sogod", "-WONoDetach", "YES", "-WOPort", "20000", "-WOLogFile", "-", "-WOPidFile", "/tmp/sogo.pid"]
|
2016-08-05 15:26:34 +02:00
|
|
|
|