Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update(unbound): add a small image + workflow to verify #205

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .docker/unbound/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# unbound

A small pre-configured container to support the deployment of dnsbl-exporter.
1 change: 1 addition & 0 deletions .docker/unbound/rootfs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# todo
9 changes: 9 additions & 0 deletions .docker/unbound/rootfs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM alpinelinux/unbound:latest

RUN apk add --update bind-tools drill
ADD https://www.internic.net/domain/named.cache /etc/unbound/root.hints
ADD . /

RUN unbound-checkconf

EXPOSE 5353/udp
41 changes: 41 additions & 0 deletions .docker/unbound/rootfs/etc/unbound/unbound.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
server:
username: unbound
port: 5353
verbosity: 1
interface: 0.0.0.0@5353
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: no
prefer-ip4: yes
prefer-ip6: no
do-daemonize: no
access-control: 0.0.0.0/0 allow
logfile: ""
use-syslog: no
log-queries: yes
hide-identity: yes
hide-version: yes
harden-glue: yes
harden-dnssec-stripped: yes
use-caps-for-id: yes
cache-min-ttl: 3600
cache-max-ttl: 86400
prefetch: yes
num-threads: 4
msg-cache-slabs: 8
rrset-cache-slabs: 8
infra-cache-slabs: 8
key-cache-slabs: 8
rrset-cache-size: 256m
msg-cache-size: 128m
so-rcvbuf: 1m
private-address: 192.168.1.0/16
unwanted-reply-threshold: 10000
do-not-query-localhost: no
val-clean-additional: yes
root-hints: "/etc/unbound/root.hints"
forward-zone:
name: "."
forward-addr: 9.9.9.9
forward-addr: 149.112.112.112
48 changes: 30 additions & 18 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,44 @@ on:
pull_request:

jobs:
build_unbound:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
with:
context: .docker/unbound/rootfs
push: false
tags: ghcr.io/luzilla/unbound:dev

test:
strategy:
matrix:
go-version: [1.20.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- run: go test ./...
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- run: go test ./...

release_test:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- run: docker buildx ls
- uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --snapshot --clean
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- run: docker buildx ls
- uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --snapshot --clean
Loading