Aggiunto avvio di sendmail a wordpress.
This commit is contained in:
parent
dc2241e30e
commit
368d8e72c3
|
@ -3,6 +3,17 @@ FROM wordpress:5.7
|
|||
RUN apt update && apt upgrade -y
|
||||
RUN apt install -y sendmail
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
# Idea from https://hub.docker.com/r/gwee/wordpress-sendmail-docker/dockerfile/
|
||||
|
||||
# Create script to use as new entrypoint, which
|
||||
# 1. Creates a localhost entry for container hostname in /etc/hosts
|
||||
# 2. Restarts sendmail to discover this entry
|
||||
# 3. Calls original docker-entrypoint.sh
|
||||
RUN echo '#!/bin/bash' >> /usr/local/bin/docker-entrypoint-wrapper.sh \
|
||||
&& echo 'set -euo pipefail' >> /usr/local/bin/docker-entrypoint-wrapper.sh \
|
||||
&& echo 'echo "127.0.0.1 $(hostname) localhost localhost.localdomain" >> /etc/hosts' >> /usr/local/bin/docker-entrypoint-wrapper.sh \
|
||||
&& echo 'service sendmail restart' >> /usr/local/bin/docker-entrypoint-wrapper.sh \
|
||||
&& echo 'exec docker-entrypoint.sh "$@"' >> /usr/local/bin/docker-entrypoint-wrapper.sh \
|
||||
&& chmod +x /usr/local/bin/docker-entrypoint-wrapper.sh
|
||||
|
||||
CMD ["docker-entrypoint-wrapper.sh", "apache2-foreground"]
|
||||
|
|
Loading…
Reference in New Issue