From aa1686300af854a87f5cb8fe948fe2152d6d2281 Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez Date: Fri, 29 Nov 2019 11:43:51 +0100 Subject: [PATCH 1/2] Exec supervisor to make it PID 1 --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index d2f92a7..0701688 100644 --- a/run.sh +++ b/run.sh @@ -70,4 +70,4 @@ add_config_value "mynetworks" "${nets}" # starting services rm -f /var/spool/postfix/pid/master.pid -supervisord +exec supervisord From de6031105c1f4a5e98427034cae457468a305bb7 Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez Date: Fri, 29 Nov 2019 11:44:46 +0100 Subject: [PATCH 2/2] Single COPY to reduce number of layers --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5971971..db5c34f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,11 @@ RUN yum install -y epel-release && yum update -y && \ RUN sed -i -e "s/^nodaemon=false/nodaemon=true/" /etc/supervisord.conf RUN sed -i -e 's/inet_interfaces = localhost/inet_interfaces = all/g' /etc/postfix/main.cf -COPY etc/*.conf /etc/ -COPY etc/rsyslog.d/* /etc/rsyslog.d +COPY etc/ /etc/ COPY run.sh / RUN chmod +x /run.sh -COPY etc/supervisord.d/*.ini /etc/supervisord.d/ RUN newaliases EXPOSE 25 #ENTRYPOINT ["/run.sh"] -CMD ["/run.sh"] \ No newline at end of file +CMD ["/run.sh"]