Skip to content

Commit

Permalink
Inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
paroga committed May 28, 2022
0 parents commit c25245a
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 0 * * *"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ !github.event_name != 'pull_request' }}
tags: ghcr.io/${{ github.repository }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM debian:bullseye-slim

RUN set -ex; \
apt-get update; \
apt-get install -y \
libclass-dbi-mysql-perl \
libfile-mimeinfo-perl \
libio-socket-inet6-perl \
libio-socket-ip-perl \
libmail-imapclient-perl \
libmail-mbox-messageparser-perl \
libmime-tools-perl \
libperlio-gzip-perl \
libxml-simple-perl \
unzip; \
rm -rf /var/lib/apt/lists/*

ENV DMARCPARSER_VERSION 2af80e6a0ccc57bfe4e6bc8ae11c15b435c3d919
ENV DMARCPARSER_SHA256 27401ba15b1f97a962b9f8bf0fb0943cf0d005784e5fab850ea604500b751cd5

RUN set -ex; \
apt-get update; \
apt-get install -y curl; \
cd /usr/local/bin; \
curl -o dmarcts-report-parser.pl -fSL https://github.com/techsneeze/dmarcts-report-parser/raw/${DMARCPARSER_VERSION}/dmarcts-report-parser.pl; \
echo "$DMARCPARSER_SHA256 dmarcts-report-parser.pl" | sha256sum -c -; \
chmod +x dmarcts-report-parser.pl; \
rm -rf /var/lib/apt/lists/*

COPY run.sh /

CMD ["/run.sh"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Patrick Gansterer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

while :
do
dmarcts-report-parser.pl -i --info
sleep 1h
done

0 comments on commit c25245a

Please sign in to comment.