Files
04f026b79c integration: move curl/unbound install from runtime to image build
The startup scripts ran 'apk add curl unbound' after switching
/etc/resolv.conf to the integration DNS resolver, causing package
fetch failures. Move these dependencies into the Dockerfile via
EXTRA_PACKAGES build arg so they're installed before DNS is switched.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-19 19:51:44 +02:00

32 lines
758 B
Docker

FROM golang:1-alpine AS build
WORKDIR /build
COPY . .
RUN GOPROXY=off CGO_ENABLED=0 go build -trimpath
# Using latest may break at some point, but will hopefully be convenient most of the time.
FROM alpine:latest
WORKDIR /mox
COPY --from=build /build/mox /bin/mox
ARG EXTRA_PACKAGES=""
RUN apk add --no-cache tzdata ${EXTRA_PACKAGES}
# SMTP for incoming message delivery.
EXPOSE 25/tcp
# SMTP/submission with TLS.
EXPOSE 465/tcp
# SMTP/submission without initial TLS.
EXPOSE 587/tcp
# HTTP for internal account and admin pages.
EXPOSE 80/tcp
# HTTPS for ACME (Let's Encrypt), MTA-STS and autoconfig.
EXPOSE 443/tcp
# IMAP with TLS.
EXPOSE 993/tcp
# IMAP without initial TLS.
EXPOSE 143/tcp
# Prometheus metrics.
EXPOSE 8010/tcp
CMD ["/bin/mox", "serve"]