Skip to content

Commit bf7dccd

Browse files
committed
Combine some post-build steps
1 parent b3ba04d commit bf7dccd

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

Dockerfile

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,23 @@ RUN su -g wheel -c 'makepkg -isr --noconfirm' - build && rm -rf /build/sogo && p
3333
WORKDIR /
3434
RUN rmdir /build
3535

36-
RUN sed 's/^Listen .*/Listen 20001/' -i /etc/httpd/conf/httpd.conf
37-
RUN sed 's|^ErrorLog.*|ErrorLog /dev/stderr|' -i /etc/httpd/conf/httpd.conf
38-
RUN sed 's/^#\(LoadModule .*\/mod_rewrite\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
39-
RUN sed 's/^#\(LoadModule .*\/mod_proxy\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
40-
RUN sed 's/^#\(LoadModule .*\/mod_proxy_http\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
41-
RUN sed 's/^#\(LoadModule .*\/mod_proxy_http2\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
42-
RUN sed 's/^#\(LoadModule .*\/mod_proxy_balancer\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
43-
RUN sed 's/^#\(LoadModule .*\/mod_headers\.so\)/\1/' -i /etc/httpd/conf/httpd.conf
36+
RUN sed -e 's/^Listen .*/Listen 20001/' \
37+
-e 's|^ErrorLog.*|ErrorLog /dev/stderr|' \
38+
-e 's/^#\(LoadModule .*\/mod_rewrite\.so\)/\1/' \
39+
-e 's/^#\(LoadModule .*\/mod_proxy\.so\)/\1/' \
40+
-e 's/^#\(LoadModule .*\/mod_proxy_http\.so\)/\1/' \
41+
-e 's/^#\(LoadModule .*\/mod_proxy_http2\.so\)/\1/' \
42+
-e 's/^#\(LoadModule .*\/mod_proxy_balancer\.so\)/\1/' \
43+
-e 's/^#\(LoadModule .*\/mod_headers\.so\)/\1/' \
44+
-i /etc/httpd/conf/httpd.conf
4445
RUN printf 'Include conf/extra/SOGo.conf\n' >>/etc/httpd/conf/httpd.conf
4546

46-
COPY event_listener.ini /etc/supervisor.d/event_listener.ini
47-
COPY event_listener.sh /usr/local/bin/event_listener.sh
48-
RUN chmod +x /usr/local/bin/event_listener.sh
49-
RUN mkdir /var/run/sogo && chown sogo:sogo /var/run/sogo
50-
RUN mkdir /var/spool/sogo && chown sogo:sogo /var/spool/sogo
51-
COPY sogod.ini /etc/supervisor.d/sogod.ini
52-
COPY apache.ini /etc/supervisor.d/apache.ini
53-
COPY cronie.ini /etc/supervisor.d/cronie.ini
47+
COPY event_listener.ini sogod.ini apache.ini cronie.ini /etc/supervisor.d/
48+
COPY --chmod=755 event_listener.sh /usr/local/bin/event_listener.sh
49+
RUN mkdir /var/run/sogo && chown sogo:sogo /var/run/sogo && \
50+
mkdir /var/spool/sogo && chown sogo:sogo /var/spool/sogo
5451
COPY crontab /etc/crontab
55-
RUN mkdir -p /usr/share/doc/sogo
56-
COPY sogo-backup.sh /usr/share/doc/sogo/sogo-backup.sh
52+
COPY --chmod=755 sogo-backup.sh /usr/share/doc/sogo/sogo-backup.sh
5753

5854
CMD ["/usr/sbin/supervisord", "--nodaemon"]
5955
EXPOSE 20000 20001

sogo-backup.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)