From f259e9ed741d3015542c1636403f31915addd06c Mon Sep 17 00:00:00 2001 From: Ben Yanke Date: Mon, 7 May 2018 23:12:01 -0500 Subject: [PATCH 1/2] Adding dumb-init This allows it to run a bit better, especially properly handle exit signals instead of needing to be force killed. Every docker image should use proper init handling - this PR adds a transparent one which doesn't affect the operation but adds proper init functionality. --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6a61f2a..d4d334f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,11 @@ MAINTAINER Joeri Verdeyen ENV HTTP_PORT 1080 ENV SMTP_PORT 1025 + RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ libsqlite3-dev \ + wget \ ruby \ ruby-dev \ build-essential && \ @@ -17,10 +19,13 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists +RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64 && chmod +x /usr/local/bin/dumb-init + RUN echo Europe/Brussels > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata EXPOSE 1080 1025 COPY run.sh /run.sh RUN chmod +x /run.sh -CMD ["/run.sh"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/dumb-init", "--"] +CMD ["/run.sh"] From 674992aa670ef3c3fd923a4e1d237113ec7b95fc Mon Sep 17 00:00:00 2001 From: Ben Yanke Date: Tue, 8 May 2018 13:36:38 -0500 Subject: [PATCH 2/2] Remove unneeded line --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d4d334f..a2da015 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ MAINTAINER Joeri Verdeyen ENV HTTP_PORT 1080 ENV SMTP_PORT 1025 - RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -q -y \ libsqlite3-dev \