mirror of
https://gitlab.com/ric_harvey/MailHog.git
synced 2024-11-23 14:24:03 +00:00
Merge branch 'docker_image_size_optimization' of https://github.com/missedone/MailHog into missedone-docker_image_size_optimization
This commit is contained in:
commit
ff162ba5ce
1 changed files with 14 additions and 0 deletions
14
Rockerfile
Normal file
14
Rockerfile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# build image
|
||||
FROM golang:latest
|
||||
RUN go get -v github.com/mailhog/MailHog && \
|
||||
cd /go/src && \
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo -v -o /go/bin/MailHog.o github.com/mailhog/MailHog/main.go
|
||||
EXPORT /go/bin/ /target
|
||||
|
||||
# run image
|
||||
FROM alpine:latest
|
||||
IMPORT /target/ /tmp
|
||||
RUN cp /tmp/MailHog.o /MailHog
|
||||
EXPOSE 1025 8025
|
||||
CMD ["/MailHog"]
|
||||
TAG mailhog/mailhog:{{ or .VERSION "latest" }}
|
Loading…
Reference in a new issue