From 2daaa5015cd7bba27500d5e6812414e7da99f0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Parmentier?= Date: Wed, 27 Sep 2017 18:26:51 +0200 Subject: [PATCH] Switch to Alpine for Mailcatcher image --- mailcatcher/Dockerfile | 16 ++++++++++++---- mailcatcher/install.sh | 15 --------------- 2 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 mailcatcher/install.sh diff --git a/mailcatcher/Dockerfile b/mailcatcher/Dockerfile index 15d52ca..71fe321 100644 --- a/mailcatcher/Dockerfile +++ b/mailcatcher/Dockerfile @@ -1,8 +1,16 @@ -FROM ruby:2.2 +FROM ruby:2.4-alpine3.6 + MAINTAINER Johannes Schickling "schickling.j@gmail.com" -ADD install.sh install.sh -RUN chmod +x install.sh && ./install.sh && rm install.sh +RUN set -xe \ + && apk add --no-cache \ + libstdc++ \ + sqlite-libs \ + && apk add --no-cache --virtual .build-deps \ + build-base \ + sqlite-dev \ + && gem install mailcatcher -v 0.6.5 --no-ri --no-rdoc \ + && apk del .build-deps # smtp port EXPOSE 1025 @@ -10,4 +18,4 @@ EXPOSE 1025 # webserver port EXPOSE 1080 -CMD ["mailcatcher", "-f", "--ip=0.0.0.0"] +CMD ["mailcatcher", "--foreground", "--ip=0.0.0.0"] diff --git a/mailcatcher/install.sh b/mailcatcher/install.sh deleted file mode 100644 index 5f3c732..0000000 --- a/mailcatcher/install.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -# exit if a command fails -set -e - -# install dependencies -apt-get update && apt-get install -y build-essential sqlite3 libsqlite3-dev - -# install mailcatcher -gem install mailcatcher -v 0.6.5 --no-ri --no-rdoc - -# cleanup package manager -apt-get remove --purge -y build-essential libsqlite3-dev && apt-get autoclean && apt-get clean -rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -