muquit / mailsend-go

mailsend-go is a multi-platform command line tool to send mail via SMTP protocol
Other
168 stars 16 forks source link

Add Dockerfile for building a Docker image #18

Closed mstrzele closed 4 years ago

mstrzele commented 4 years ago

It'd be nice to package this really useful tool as a Docker image.

mstrzele commented 4 years ago
$ docker build -t muquit/mailsend-go:latest .
Sending build context to Docker daemon  397.8kB
Step 1/8 : FROM golang:1.13.7
 ---> 6586e3d10e96
Step 2/8 : WORKDIR /go/src/github.com/muquit/mailsend-go/
 ---> Using cache
 ---> 0e2949d84d8f
Step 3/8 : COPY . .
 ---> Using cache
 ---> d48190a0a624
Step 4/8 : RUN make linux
 ---> Using cache
 ---> 87c18c4e138c
Step 5/8 : FROM alpine:latest
 ---> e7d92cdc71fe
Step 6/8 : RUN apk --no-cache add ca-certificates
 ---> Using cache
 ---> f7e87471b442
Step 7/8 : COPY --from=0 /go/src/github.com/muquit/mailsend-go/mailsend-go_linux /usr/local/bin/mailsend-go
 ---> Using cache
 ---> 427715959813
Step 8/8 : ENTRYPOINT ["/usr/local/bin/mailsend-go"]
 ---> Using cache
 ---> 7e14c829090f
Successfully built 7e14c829090f
Successfully tagged muquit/mailsend-go:latest
$ docker run -it --rm muquit/mailsend-go:latest -V
@(#) mailsend-go v1.0.6