forked from mailslurper/mailslurper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (37 loc) · 1.05 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
44
45
46
FROM golang:alpine as builder
LABEL maintainer="[email protected]"
RUN apk --no-cache add git libc-dev gcc
RUN go get github.com/mjibson/esc
COPY . /go/src/github.com/mailslurper/mailslurper
WORKDIR /go/src/github.com/mailslurper/mailslurper/cmd/mailslurper
RUN go get
RUN go generate
RUN go build
FROM alpine:3.6
RUN apk add --no-cache ca-certificates \
&& echo -e '{\n\
"wwwAddress": "0.0.0.0",\n\
"wwwPort": 8080,\n\
"wwwPublicURL": "",\n\
"serviceAddress": "0.0.0.0",\n\
"servicePort": 8085,\n\
"servicePublicURL": "",\n\
"smtpAddress": "0.0.0.0",\n\
"smtpPort": 2500,\n\
"dbEngine": "SQLite",\n\
"dbHost": "",\n\
"dbPort": 0,\n\
"dbDatabase": "./mailslurper.db",\n\
"dbUserName": "",\n\
"dbPassword": "",\n\
"maxWorkers": 1000,\n\
"autoStartBrowser": false,\n\
"keyFile": "",\n\
"certFile": "",\n\
"adminKeyFile": "",\n\
"adminCertFile": ""\n\
}'\
>> config.json
COPY --from=builder /go/src/github.com/mailslurper/mailslurper/cmd/mailslurper/mailslurper mailslurper
EXPOSE 8080 8085 2500
CMD ["./mailslurper"]