forked from inbucket/inbucket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (37 loc) · 1.19 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
37
38
39
40
41
42
43
# Docker build file for Inbucket: https://www.inbucket.org/
# Build
FROM golang:1.10-alpine as builder
RUN apk add --no-cache --virtual .build-deps git make
WORKDIR /go/src/github.com/jhillyerd/inbucket
COPY . .
ENV CGO_ENABLED 0
RUN make clean deps
RUN go build -o inbucket \
-ldflags "-X 'main.version=$(git describe --tags --always)' -X 'main.date=$(date -Iseconds)'" \
-v ./cmd/inbucket
# Run in minimal image
FROM alpine:3.7
ENV SRC /go/src/github.com/jhillyerd/inbucket
WORKDIR /opt/inbucket
RUN mkdir bin defaults ui
COPY --from=builder $SRC/inbucket bin
COPY etc/docker/defaults/greeting.html defaults
COPY ui ui
COPY etc/docker/defaults/start-inbucket.sh /
# Configuration
ENV INBUCKET_SMTP_DISCARDDOMAINS bitbucket.local
ENV INBUCKET_SMTP_TIMEOUT 30s
ENV INBUCKET_POP3_TIMEOUT 30s
ENV INBUCKET_WEB_GREETINGFILE /config/greeting.html
ENV INBUCKET_WEB_COOKIEAUTHKEY secret-inbucket-session-cookie-key
ENV INBUCKET_STORAGE_TYPE file
ENV INBUCKET_STORAGE_PARAMS path:/storage
ENV INBUCKET_STORAGE_RETENTIONPERIOD 72h
ENV INBUCKET_STORAGE_MAILBOXMSGCAP 300
# Ports: SMTP, HTTP, POP3
EXPOSE 2500 9000 1100
# Persistent Volumes
VOLUME /config
VOLUME /storage
ENTRYPOINT ["/start-inbucket.sh"]
CMD ["-logjson"]