summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile12
1 files changed, 12 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index aa35a8f..aa7c1ca 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -46,6 +46,18 @@ RUN apt update \
sudo \
&& apt clean
+# Generate OpenDKIM keypair
+# Do this here so we can print the pubkey/dns record to logs during build
+# process. After initial run, a volume should preserve the keys for later
+# runs.
+RUN mkdir -p /opendkim \
+ && chown opendkim:opendkim /opendkim \
+ && opendkim-genkey \
+ --bits=1024 \
+ --directory=/opendkim \
+ --selector=default \
+ && cat /opendkim/default.txt
+
# Install files
COPY dovecot /etc/dovecot/
COPY opendkim /etc/