-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
1,424 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM bfren/alpine-s6:alpine3.18-4.5.7 | ||
|
||
LABEL org.opencontainers.image.source="https://github.com/bfren/docker-unbound" | ||
|
||
ARG BF_IMAGE | ||
ARG BF_VERSION | ||
|
||
EXPOSE 53/tcp | ||
EXPOSE 53/udp | ||
|
||
COPY ./overlay / | ||
|
||
RUN bf-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Set environment variables. | ||
#====================================================================================================================== | ||
|
||
bf-env "UNBOUND_CONF" "/etc/unbound/unbound.conf" | ||
bf-env "UNBOUND_TRUSTED_KEY" "/usr/share/dnssec-root/trusted-key.key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Generate Unbound config file. | ||
#====================================================================================================================== | ||
|
||
bf-esh \ | ||
${BF_TEMPLATES}/unbound.conf.esh \ | ||
${UNBOUND_CONF} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/command/with-contenv sh | ||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Update root anchor. | ||
#====================================================================================================================== | ||
|
||
unbound-update-root-anchor |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E="${PWD##*/}/$(basename ${0})" | ||
|
||
|
||
#====================================================================================================================== | ||
# Show helpful log message. | ||
#====================================================================================================================== | ||
|
||
bf-svc-finish -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E="${PWD##*/}/$(basename ${0})" | ||
|
||
|
||
#====================================================================================================================== | ||
# Run Unbound service. | ||
#====================================================================================================================== | ||
|
||
[[ ! -f ${UNBOUND_CONF} ]] && bf-error "Unbound configuration file not found." | ||
|
||
bf-echo "Updating root anchor." | ||
unbound-update-root-anchor | ||
|
||
bf-echo "Checking Unbound configuration." | ||
unbound-checkconf ${UNBOUND_CONF} | ||
|
||
bf-echo "Starting Unbound in daemon mode." | ||
unbound -c ${UNBOUND_CONF} -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.17.1-r1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/sh | ||
|
||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Add Unbound user. | ||
#====================================================================================================================== | ||
|
||
bf-adduser unbound | ||
|
||
|
||
#====================================================================================================================== | ||
# Get Unbound version. | ||
#====================================================================================================================== | ||
|
||
cd /tmp | ||
|
||
VERSION=$(cat UNBOUND_BUILD) | ||
bf-echo "Unbound version ${VERSION}." | ||
|
||
|
||
#====================================================================================================================== | ||
# Install Unbound and dependencies. | ||
#====================================================================================================================== | ||
|
||
bf-echo "Installing Unbound v${VERSION}..." | ||
apk add --no-cache \ | ||
unbound=${VERSION} | ||
bf-done | ||
|
||
|
||
#====================================================================================================================== | ||
# Cleanup. | ||
#====================================================================================================================== | ||
|
||
bf-done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Attempt to connect to the local Samba server. | ||
#====================================================================================================================== | ||
|
||
drill @127.0.0.1 cloudflare.com || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/command/with-contenv sh | ||
|
||
set -euo pipefail | ||
export BF_E=`basename ${0}` | ||
|
||
|
||
#====================================================================================================================== | ||
# Update root anchor. | ||
#====================================================================================================================== | ||
|
||
unbound-anchor -v -a ${UNBOUND_TRUSTED_KEY} |