Skip to content

Commit

Permalink
dockerfile: minimize COPY layers and enable optional sogo build options
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored May 15, 2024
1 parent 784b068 commit bd1488b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ RUN apt-get update -y && \
make && \
make install && \
cd /tmp/SOGo && \
./configure --enable-debug --disable-strip && \
./configure --enable-debug --disable-strip --enable-saml2 \
--enable-mfa --enable-sodium --with-ldap-config && \
make && \
make install

Expand Down Expand Up @@ -103,10 +104,6 @@ RUN apt-get update -y && \
# add config, binaries, libraries, and init files
COPY --from=builder /usr/local/sbin/ /usr/local/sbin/
COPY --from=builder /usr/local/lib/ /usr/local/lib/

COPY --from=builder /tmp/SOGo/Scripts/sogo-default /etc/default/sogo
COPY --from=builder /tmp/SOGo/Scripts/sogo.cron /etc/cron.d/sogo
COPY --from=builder /tmp/SOGo/Scripts/sogo.conf /etc/sogo/sogo.conf
COPY --from=builder /tmp/SOGo/Scripts/ /usr/share/doc/sogo/
COPY --from=builder /tmp/SOGo/Apache/SOGo.conf /etc/apache2/conf-available/SOGo.conf

Expand All @@ -128,6 +125,10 @@ RUN a2enmod \
ln -s /usr/local/sbin/sogo-ealarms-notify /usr/sbin/sogo-ealarms-notify && \
ln -s /usr/local/sbin/sogo-slapd-sockd /usr/sbin/sogo-slapd-sockd && \
ln -s /etc/apache2/conf-available/SOGo.conf /etc/apache2/conf-enabled/SOGo.conf && \
mkdir -p /etc/cron.d /etc/default /etc/sogo && \
mv /usr/share/doc/sogo/sogo.cron /etc/cron.d/sogo && \
mv /usr/share/doc/sogo/sogo-default /etc/default/sogo && \
mv /usr/share/doc/sogo/sogo.conf /etc/sogo/sogo.conf && \
chmod +rx /usr/bin/yq && \
chmod +rx /opt/entrypoint.sh && \
chmod +rx /opt/sogod.sh
Expand Down

0 comments on commit bd1488b

Please sign in to comment.