diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0f36ab6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# syntax=docker/dockerfile:1 + +FROM python:3.8-slim-buster + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +COPY . . + +CMD [ "bash", "-c", "./entry.sh" ] \ No newline at end of file diff --git a/entry.sh b/entry.sh new file mode 100755 index 0000000..2b63113 --- /dev/null +++ b/entry.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Create data-dir if not exists +mkdir -p /data + +# TryCopy configs to data-dir +cp -n data/* /data/ + +# Execute daemon +python3 daemon.py \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..502ca26 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pyyaml +py3dns \ No newline at end of file