commit add5ac221bc36b0666789a674383f29c6765e3dd Author: Pierre-Olivier Mercier Date: Sat Jul 19 12:16:41 2025 +0200 Initial commit diff --git a/.drone-manifest.yml b/.drone-manifest.yml new file mode 100644 index 0000000..c31425c --- /dev/null +++ b/.drone-manifest.yml @@ -0,0 +1,22 @@ +image: nemunaire/opendkim:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +{{#if build.tags}} +tags: +{{#each build.tags}} + - {{this}} +{{/each}} +{{/if}} +manifests: + - image: nemunaire/opendkim:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + platform: + architecture: amd64 + os: linux + - image: nemunaire/opendkim:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + platform: + architecture: arm64 + os: linux + variant: v8 + - image: nemunaire/opendkim:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm + platform: + architecture: arm + os: linux + variant: v7 diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..b501bf2 --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,36 @@ +matrix: + platform: + - linux/amd64 + - linux/arm64 + +labels: + platform: ${platform} + +when: + event: + - push + - tag + - cron + +steps: + build-container: + image: plugins/docker + settings: + username: + from_secret: docker_username + password: + from_secret: docker_password + repo: nemunaire/opendkim + auto_tag: true + auto_tag_suffix: "${platform%/*}-${platform#*/}" + + publish-manifest: + image: plugins/manifest + settings: + auto_tag: true + ignore_missing: true + spec: .drone-manifest.yml + username: + from_secret: docker_username + password: + from_secret: docker_password diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9baaee3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:3 + +ENTRYPOINT ["/docker-entrypoint.sh"] +CMD ["/usr/sbin/opendkim", "-A", "-f", "-x", "/etc/opendkim/opendkim.conf"] + +COPY entrypoint.sh /docker-entrypoint.sh +COPY opendkim.conf /etc/opendkim/opendkim.conf + +RUN apk --no-cache add opendkim diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..cb91249 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +ln -sf /proc/1/fd/1 /var/log/messages + +syslogd + +exec $@ diff --git a/opendkim.conf b/opendkim.conf new file mode 100644 index 0000000..0d70921 --- /dev/null +++ b/opendkim.conf @@ -0,0 +1,13 @@ +Syslog yes +SyslogSuccess yes +LogResults yes +LogWhy yes +Canonicalization relaxed/simple +UMask 002 +Socket unix:/var/run/opendkim/opendkim.sock +UserID opendkim:opendkim + +KeyTable refile:/etc/opendkim/KeyTable +SigningTable refile:/etc/opendkim/SigningTable +ExternalIgnoreList refile:/etc/opendkim/TrustedHosts +InternalHosts refile:/etc/opendkim/TrustedHosts