-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (30 loc) · 1.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM alpine:3.16
# Mailcatcher version
ARG MAILCATCHER_VERSION=0.8.2
# Label
LABEL maintainer="[email protected]" \
version="1.7.8" \
description="Debug emails with style using mailcatcher a super simple SMTP server which catches messages sent to it and displays them in a web interface" \
org.label-schema.name="mailcatcher" \
org.label-schema.version="${MAILCATCHER_VERSION}" \
org.label-schema.license="MIT"
# Setting the environment defaults to en_US.UTF-8
# --message-limit default value is 50
ENV LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
LANGUAGE="en_US.UTF-8" \
TIMEZONE="UTC" \
MAIL_LIMIT=50
RUN apk add --no-cache ruby \
ruby-json sqlite-libs libstdc++ \
ruby-dev make g++ sqlite-dev \
&& gem install --no-document --no-user-install net-smtp \
&& gem install -v $MAILCATCHER_VERSION mailcatcher --no-document \
&& apk del --rdepends --purge ruby-dev make g++ sqlite-dev \
# && apk update && apk upgrade \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
# expose smtp port & web port
EXPOSE 1025 1080
# launch mailcatcher as a foreground process
# Using sh to enable string interpolation
CMD ["sh", "-c", "mailcatcher --foreground --smtp-port=1025 --http-port=1080 --ip=0.0.0.0 --messages-limit=$MAIL_LIMIT"]