Use entrypoint to sed some vars
parent
2ab9a2d7b5
commit
9ce260fbe0
|
@ -27,7 +27,8 @@ RUN wget http://hg.dovecot.org/dovecot-antispam-plugin/archive/tip.tar.gz -O - |
|
||||||
&& make \
|
&& make \
|
||||||
&& make install
|
&& make install
|
||||||
|
|
||||||
ADD rspamd-pipe /usr/local/bin/rspamd-pipe
|
COPY ./rspamd-pipe /usr/local/bin/rspamd-pipe
|
||||||
|
COPY ./docker-entrypoint.sh /
|
||||||
|
|
||||||
RUN chmod +x /usr/local/bin/rspamd-pipe
|
RUN chmod +x /usr/local/bin/rspamd-pipe
|
||||||
RUN groupadd -g 5000 vmail
|
RUN groupadd -g 5000 vmail
|
||||||
|
@ -35,4 +36,5 @@ RUN useradd -g vmail -u 5000 vmail -d /var/vmail
|
||||||
|
|
||||||
EXPOSE 24 10001
|
EXPOSE 24 10001
|
||||||
|
|
||||||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||||
CMD ["/usr/sbin/dovecot", "-F"]
|
CMD ["/usr/sbin/dovecot", "-F"]
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
sed -i "/^connect/c\connect = \"host=mysql dbname=${DBNAME} user=${DBUSER} password=${DBPASS}\"" /etc/dovecot/sql/*
|
||||||
|
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue