try replacing config tags with environment variables
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m7s
All checks were successful
Build OCI Containers / Build Containers (push) Successful in 1m7s
This commit is contained in:
parent
b752ac0d1f
commit
7e54796d6e
@ -1,13 +1,16 @@
|
|||||||
FROM debian:bookworm-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get -y upgrade && \
|
apt-get -y upgrade && \
|
||||||
apt-get -y --purge autoremove && \
|
apt-get -y --purge autoremove && \
|
||||||
apt-get -y install postfix postfix-pgsql postgrey && \
|
apt-get -y install postfix postfix-pgsql postgrey && \
|
||||||
apt-get -y clean
|
apt-get -y clean && \
|
||||||
|
chmod a+x /entrypoint.sh
|
||||||
|
|
||||||
EXPOSE 25/tcp
|
EXPOSE 25/tcp
|
||||||
EXPOSE 465/tcp
|
EXPOSE 465/tcp
|
||||||
EXPOSE 587/tcp
|
EXPOSE 587/tcp
|
||||||
|
|
||||||
CMD ["/usr/sbin/postfix", "start-fg"]
|
CMD ["/entrypoint.sh"]
|
||||||
10
postfix/entrypoint.sh
Normal file
10
postfix/entrypoint.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
for cf in /etc/postfix/*.cf; do
|
||||||
|
sed -iE -e 's/%DB_PASSWORD%/${DB_PASSWORD}/g' \
|
||||||
|
-e 's/%DB_HOST%/${DB_HOST}/g' \
|
||||||
|
-e 's/%DB_USER%/${DB_USER}/g' \
|
||||||
|
-e 's/%DB_DATABASE%/${DB_DATABASE}/g' ${cf};
|
||||||
|
done
|
||||||
|
|
||||||
|
/usr/sbin/postfix start-fg
|
||||||
Loading…
Reference in New Issue
Block a user