-
-
Notifications
You must be signed in to change notification settings - Fork 863
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from ysknsid25/mailhog
Introduction of mailhog
- Loading branch information
Showing
5 changed files
with
105 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
dbdata | ||
dbdata | ||
mails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# | ||
# MailHog Dockerfile | ||
# | ||
|
||
FROM golang:1.18-alpine as builder | ||
|
||
# Install MailHog: | ||
RUN apk --no-cache add --virtual build-dependencies \ | ||
git \ | ||
&& mkdir -p /root/gocode \ | ||
&& export GOPATH=/root/gocode \ | ||
&& go install github.com/mailhog/MailHog@latest | ||
|
||
FROM alpine:3 | ||
# Add mailhog user/group with uid/gid 1000. | ||
# This is a workaround for boot2docker issue #581, see | ||
# https://github.com/boot2docker/boot2docker/issues/581 | ||
RUN adduser -D -u 1000 mailhog | ||
|
||
COPY --from=builder /root/gocode/bin/MailHog /usr/local/bin/ | ||
|
||
USER mailhog | ||
|
||
WORKDIR /home/mailhog | ||
|
||
RUN mkdir ./mails | ||
RUN chmod 644 ./mails | ||
|
||
ENTRYPOINT ["MailHog"] | ||
|
||
# Expose the SMTP and HTTP ports: | ||
EXPOSE 1025 8025 |