mirror of
https://github.com/axllent/mailpit.git
synced 2024-12-28 23:06:43 +02:00
f548bbb874
Originally requested in #72
22 lines
405 B
Docker
22 lines
405 B
Docker
FROM golang:alpine as builder
|
|
|
|
ARG VERSION=dev
|
|
|
|
COPY . /app
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache git npm && \
|
|
npm install && npm run package && \
|
|
CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/axllent/mailpit/config.Version=${VERSION}" -o /mailpit
|
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /mailpit /mailpit
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
EXPOSE 1025/tcp 1110/tcp 8025/tcp
|
|
|
|
ENTRYPOINT ["/mailpit"]
|