Replaces the gotoolkit helpers with the standard library and the libraries they wrapped: - gotoolkit/encoding TOML wrapper -> pelletier/go-toml/v2 directly, behind a new smtp2shoutrrr.LoadConfig shared by both commands. - gotoolkit/service + gotoolkit/model.Server -> signal.NotifyContext and a concrete *Server whose Start shuts the listener down gracefully when its context is cancelled. Also drops the unused ANONYMOUS SASL client from cmd/sendmail, bumps alpine, golangci-lint and the CI actions, and adds coverage for config loading and the server lifecycle. Closes FMG-2 Co-authored-by: multica-agent <github@multica.ai>
21 lines
793 B
Docker
21 lines
793 B
Docker
# Build dependencies on native arch (no QEMU needed)
|
|
FROM --platform=$BUILDPLATFORM alpine:3.24 AS base
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
RUN addgroup -g 1000 smtp2shoutrrr && adduser -u 1000 -G smtp2shoutrrr -s /bin/sh -D smtp2shoutrrr
|
|
|
|
# Runtime image
|
|
FROM scratch
|
|
LABEL maintainer="Felipe Martin <me@fmartingr.com>"
|
|
LABEL org.opencontainers.image.source="https://git.nakama.town/fmartingr/smtp2shoutrrr"
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo
|
|
COPY --from=base /etc/passwd /etc/passwd
|
|
COPY --from=base /etc/group /etc/group
|
|
COPY $TARGETPLATFORM/smtp2shoutrrr /usr/local/bin/smtp2shoutrrr
|
|
|
|
USER smtp2shoutrrr
|
|
|
|
ENTRYPOINT ["/usr/local/bin/smtp2shoutrrr"]
|