From 7b2c202acc487c3f5e312cbb97040c12cd70db6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sat, 8 Nov 2025 19:27:06 +0100 Subject: [PATCH] feat: add msmtp to Netdata for email alerts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created custom Dockerfile for Netdata container that includes msmtp and msmtp-mta packages for sending email notifications. Changes: - Added netdata/Dockerfile extending netdata/netdata:latest - Installed msmtp, msmtp-mta, and ca-certificates via apk - Set proper permissions (600) for msmtprc config file - Updated compose.yaml to build from custom Dockerfile This enables Netdata to send health alarm notifications via email using the IONOS SMTP configuration in msmtprc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- netdata/Dockerfile | 8 ++++++++ netdata/compose.yaml | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 netdata/Dockerfile diff --git a/netdata/Dockerfile b/netdata/Dockerfile new file mode 100644 index 0000000..afd4edc --- /dev/null +++ b/netdata/Dockerfile @@ -0,0 +1,8 @@ +# Dockerfile for Netdata with msmtp support for email alerts +FROM netdata/netdata:latest + +# Install msmtp for sending emails +RUN apk add --no-cache msmtp msmtp-mta ca-certificates + +# Set proper permissions for msmtp config +RUN chmod 600 /etc/msmtprc || true diff --git a/netdata/compose.yaml b/netdata/compose.yaml index 3491a35..0b774a0 100644 --- a/netdata/compose.yaml +++ b/netdata/compose.yaml @@ -1,5 +1,8 @@ services: netdata: + build: + context: . + dockerfile: Dockerfile image: ${NETDATA_IMAGE:-netdata/netdata:latest} container_name: ${NETDATA_COMPOSE_PROJECT_NAME}_app restart: unless-stopped