From e0ffedc9449e79c302c1a2b3298464d392124909 Mon Sep 17 00:00:00 2001 From: kirillius Date: Fri, 31 Jul 2026 20:13:20 +0300 Subject: [PATCH] + dockerfile --- Dockerfile | 11 +++++++++++ build-docker-image.sh | 4 ++++ docker/config.json | 42 ++++++++++++++++++++++++++++++++++++++++++ docker/entrypoint.sh | 2 ++ 4 files changed, 59 insertions(+) create mode 100644 Dockerfile create mode 100755 build-docker-image.sh create mode 100644 docker/config.json create mode 100755 docker/entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2efabf5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM alpine:latest + +RUN apk add --no-cache openjdk25 git + +COPY launcher.sh /launcher.sh +COPY docker/config.json /data/config.json +COPY docker/entrypoint.sh /entrypoint.sh + +RUN chmod +x /launcher.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/build-docker-image.sh b/build-docker-image.sh new file mode 100755 index 0000000..8b72e35 --- /dev/null +++ b/build-docker-image.sh @@ -0,0 +1,4 @@ +#!/bin/sh + + docker build -f docker/Dockerfile -t pfsdn . + docker save -o pfsdn.tar pfsdn \ No newline at end of file diff --git a/docker/config.json b/docker/config.json new file mode 100644 index 0000000..ab265f7 --- /dev/null +++ b/docker/config.json @@ -0,0 +1,42 @@ +{ + "subscribedResources": [], + "subscriptions": [ + { + "name": "updates", + "source": "https://git.kirillius.ru/kirillius/protected-resources-list.git", + "type": "ru.kirillius.pf.sdn.External.API.GitSubscription", + "script": "" + }, + { + "name": "local", + "source": "/data/local", + "type": "ru.kirillius.pf.sdn.External.API.LocalFilesystemSubscription", + "script": "" + } + ], + "enabledComponents": [], + "httpPort": 8080, + "filteredResources": { + "description": "", + "domains": [], + "subnets": [], + "ASN": [] + }, + "mergeSubnets": true, + "updateSubscriptionsInterval": 6, + "mergeSubnetsWithUsage": 51, + "componentsConfig": {}, + "customResources": { + "description": "", + "domains": [], + "subnets": [], + "ASN": [] + }, + "passwordHash": "", + "displayDebuggingInfo": true, + "cachingAS": true, + "host": "0.0.0.0", + "updateASInterval": 12, + "cacheDirectory": "/var/cache/pf-sdn", + "passwordSalt": "bf932418-10db-4e03-b5cd-23bc1bfb86e4" +} \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh new file mode 100755 index 0000000..267f298 --- /dev/null +++ b/docker/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec /launcher.sh -c /data