Compare commits
14 Commits
abd592986b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4a4f4fead | ||
|
|
fa565e4f2c | ||
|
|
d0502ff5a6 | ||
|
|
9b115f378d | ||
|
|
06680c87cf | ||
|
|
f2ea209b15 | ||
|
|
25b91f88b2 | ||
|
|
2498931f7d | ||
|
|
a7f916538b | ||
|
|
3dcfd89912 | ||
|
|
c6d88ce832 | ||
|
|
e4e01583cc | ||
|
|
1027601623 | ||
|
|
46f989dd37 |
192
.drone.star
192
.drone.star
@@ -1,30 +1,143 @@
|
|||||||
def main(ctx):
|
def main(ctx):
|
||||||
return [
|
return [
|
||||||
#stepPR("amd64"),
|
stepPR("amd64", "motsognir"),
|
||||||
#stepPR("arm64"),
|
stepPR("arm64", "motsognir"),
|
||||||
stepMergeMaster("amd64"),
|
stepMergeMaster("amd64", "motsognir"),
|
||||||
#stepMergeMaster("arm64"),
|
stepMergeMaster("arm64", "motsognir"),
|
||||||
|
stepBuildWeekly("amd64", "motsognir"),
|
||||||
|
stepBuildWeekly("arm64", "motsognir"),
|
||||||
|
|
||||||
|
stepPR("amd64", "webtest"),
|
||||||
|
stepPR("arm64", "webtest"),
|
||||||
|
stepMergeMaster("amd64", "webtest"),
|
||||||
|
stepMergeMaster("arm64", "webtest"),
|
||||||
|
stepBuildWeekly("amd64", "webtest"),
|
||||||
|
stepBuildWeekly("arm64", "webtest"),
|
||||||
|
|
||||||
|
stepPR("amd64", "unbound"),
|
||||||
|
stepPR("arm64", "unbound"),
|
||||||
|
stepMergeMaster("amd64", "unbound"),
|
||||||
|
stepMergeMaster("arm64", "unbound"),
|
||||||
|
stepBuildWeekly("amd64", "unbound"),
|
||||||
|
stepBuildWeekly("arm64", "unbound"),
|
||||||
|
|
||||||
|
notify(ctx),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def notify(ctx):
|
||||||
|
return {
|
||||||
|
"kind": "pipeline",
|
||||||
|
"type": "docker",
|
||||||
|
"name": "matrix-notifications",
|
||||||
|
"clone": {
|
||||||
|
"disable": True,
|
||||||
|
},
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"name": "notify",
|
||||||
|
"image": "plugins/matrix",
|
||||||
|
"settings": {
|
||||||
|
"homeserver": {
|
||||||
|
"from_secret": "matrix-homeserver"
|
||||||
|
},
|
||||||
|
"roomid": {
|
||||||
|
"from_secret": "matrix-room"
|
||||||
|
},
|
||||||
|
"username": {
|
||||||
|
"from_secret": "matrix-user"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"from_secret": "matrix-password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"depends_on": [
|
||||||
|
"docker-build-motsognir-amd64",
|
||||||
|
"docker-build-motsognir-arm64",
|
||||||
|
"docker-build-webtest-amd64",
|
||||||
|
"docker-build-webtest-arm64",
|
||||||
|
"docker-build-unbound-amd64",
|
||||||
|
"docker-build-unbound-arm64",
|
||||||
|
|
||||||
def stepPR(arch):
|
"docker-publish-motsognir-amd64",
|
||||||
|
"docker-publish-motsognir-arm64",
|
||||||
|
"docker-publish-webtest-amd64",
|
||||||
|
"docker-publish-webtest-arm64",
|
||||||
|
"docker-publish-unbound-amd64",
|
||||||
|
"docker-publish-unbound-arm64",
|
||||||
|
|
||||||
|
"docker-publish-weekly-motsognir-amd64",
|
||||||
|
"docker-publish-weekly-motsognir-arm64",
|
||||||
|
"docker-publish-weekly-webtest-amd64",
|
||||||
|
"docker-publish-weekly-webtest-arm64",
|
||||||
|
"docker-publish-weekly-unbound-amd64",
|
||||||
|
"docker-publish-weekly-unbound-arm64",
|
||||||
|
],
|
||||||
|
"trigger": {
|
||||||
|
"ref": [
|
||||||
|
"refs/heads/master",
|
||||||
|
"refs/heads/release*",
|
||||||
|
"refs/tags/**",
|
||||||
|
"refs/pull/**",
|
||||||
|
],
|
||||||
|
"status": [
|
||||||
|
"failure",
|
||||||
|
"success",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def stepPR(arch, path):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
"name": "docker-build-%s" % (arch),
|
"name": "docker-build-%s-%s" % (path, arch),
|
||||||
"platform": {
|
"platform": {
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "build-image-%s" % (arch),
|
"name": "build-image-%s-%s" % (path, arch),
|
||||||
"image": "plugins/docker",
|
"image": "plugins/docker",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
"dockerfile": "%s/Dockerfile" % (path),
|
||||||
"repo": "dragonchaser/motsognir",
|
"repo": "dragonchaser/%s" % (path),
|
||||||
"dry_run": "true",
|
"dry_run": "true",
|
||||||
"tag": "latest-%s" % (arch),
|
"tag": "latest-%s" % (arch),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"trigger": {
|
||||||
|
"ref": [
|
||||||
|
"refs/pull/**",
|
||||||
|
],
|
||||||
|
"status": [
|
||||||
|
"success",
|
||||||
|
"failure"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
def stepMergeMaster(arch, path):
|
||||||
|
return {
|
||||||
|
"kind": "pipeline",
|
||||||
|
"type": "docker",
|
||||||
|
"name": "docker-publish-%s-%s" % (path, arch),
|
||||||
|
"platform": {
|
||||||
|
"os": "linux",
|
||||||
|
"arch": arch,
|
||||||
|
},
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"name": "build-and-publish-image-%s-%s" % (path, arch),
|
||||||
|
"image": "plugins/docker",
|
||||||
|
"settings": {
|
||||||
|
"dockerfile": "%s/Dockerfile" % (path),
|
||||||
|
"repo": "dragonchaser/%s" % (path),
|
||||||
|
"dry_run": "false",
|
||||||
|
"tag": "latest-%s" % (arch),
|
||||||
"username": {
|
"username": {
|
||||||
"from_secret": "dockerhub-user"
|
"from_secret": "dockerhub-user"
|
||||||
},
|
},
|
||||||
@@ -36,68 +149,51 @@ def stepPR(arch):
|
|||||||
],
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"ref": [
|
"ref": [
|
||||||
"refs/pull/**",
|
"refs/heads/master",
|
||||||
],
|
],
|
||||||
},
|
"status": [
|
||||||
|
"success",
|
||||||
|
"failure"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def stepMergeMaster(arch):
|
def stepBuildWeekly(arch, path):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
"name": "docker-publish-%s" % (arch),
|
"name": "docker-publish-weekly-%s-%s" % (path, arch),
|
||||||
"platform": {
|
"platform": {
|
||||||
"os": "linux",
|
"os": "linux",
|
||||||
"arch": arch,
|
"arch": arch,
|
||||||
},
|
},
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"name": "dockerhub-build-and-publish-image-%s" % (arch),
|
"name": "build-and-publish-image-%s-%s" % (path, arch),
|
||||||
"image": "plugins/docker",
|
"image": "plugins/docker",
|
||||||
"settings": {
|
"settings": {
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
"dockerfile": "%s/Dockerfile" % (path),
|
||||||
"repo": "dragonchaser/motsognir",
|
"repo": "dragonchaser/%s" % (path),
|
||||||
"dry_run": "true",
|
"dry_run": "false",
|
||||||
"purge": "false",
|
|
||||||
"tag": "latest-%s" % (arch),
|
"tag": "latest-%s" % (arch),
|
||||||
"volumes": {
|
|
||||||
"name": "dockersock",
|
|
||||||
"path": "/var/run/docker.sock"
|
|
||||||
},
|
|
||||||
"username": {
|
"username": {
|
||||||
"from_secret": "dockerhub-userXXX"
|
"from_secret": "dockerhub-user"
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
"from_secret": "dockerhub-passwordXXX"
|
"from_secret": "dockerhub-password"
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "quay-build-and-publish-image-%s" % (arch),
|
|
||||||
"image": "plugins/docker",
|
|
||||||
"settings": {
|
|
||||||
"dockerfile": "motsognir/Dockerfile",
|
|
||||||
"repo": "quay.io/dragonchaser/motsognir",
|
|
||||||
"dry_run": "true",
|
|
||||||
"purge": "false",
|
|
||||||
"tag": "latest-%s" % (arch),
|
|
||||||
"volumes": {
|
|
||||||
"name": "dockersock",
|
|
||||||
"path": "/var/run/docker.sock"
|
|
||||||
},
|
|
||||||
"username": {
|
|
||||||
"from_secret": "dockerhub-userXXX"
|
|
||||||
},
|
|
||||||
"password": {
|
|
||||||
"from_secret": "dockerhub-passwordXXX"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"trigger": {
|
"trigger": {
|
||||||
"ref": [
|
"ref": [
|
||||||
##"refs/heads/master",
|
"refs/heads/master",
|
||||||
"refs/pull/**",
|
|
||||||
],
|
],
|
||||||
|
"event": [
|
||||||
|
"cron"
|
||||||
|
],
|
||||||
|
"cron": [
|
||||||
|
"weekly"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
43
.github/workflows/docker-image.yml
vendored
43
.github/workflows/docker-image.yml
vendored
@@ -1,43 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_REGISTRY: ghcr.io
|
|
||||||
DOCKER_IMAGE: dragonchaser/motsognir
|
|
||||||
DOCKER_TARGET_PLATFORM: "linux/arm/v7,linux/arm64,linux/amd64"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
if: success()
|
|
||||||
id: prepare
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
|
||||||
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
|
||||||
#echo ::set-output name=version::${GITHUB_RUN_NUMBER}
|
|
||||||
echo ::set-output name=version::latest
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Run Buildx
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
cd motsognir
|
|
||||||
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile.arm32v7 --output type=image,push=true .
|
|
||||||
42
.github/workflows/ghrunner.yml
vendored
42
.github/workflows/ghrunner.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
name: Docker Image CI for GHRUNNER
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_REGISTRY: ghcr.io
|
|
||||||
DOCKER_IMAGE: dragonchaser/ghrunner
|
|
||||||
DOCKER_TARGET_PLATFORM: "linux/arm64,linux/amd64"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: crazy-max/ghaction-docker-buildx@v1
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
|
|
||||||
- name: Prepare
|
|
||||||
if: success()
|
|
||||||
id: prepare
|
|
||||||
run: |
|
|
||||||
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
|
|
||||||
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
|
|
||||||
echo ::set-output name=version::latest
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Run Buildx
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
cd ghrunner
|
|
||||||
docker buildx build --platform ${{ steps.prepare.outputs.docker_platform }} --tag ${{ steps.prepare.outputs.docker_image }}:${{steps.prepare.outputs.version }} --file ./Dockerfile --output type=image,push=true .
|
|
||||||
12
README.md
12
README.md
@@ -1,10 +1,12 @@
|
|||||||
# dockerhub-autobuild
|
# dockerhub-autobuild
|
||||||
|
|
||||||
|
[](https://drone.services.datenschmutz.space/dragonchaser/dockerhub-autobuild)
|
||||||
|
|
||||||
This repo contains Dockerfiles used for autobuilding on Dockerhub.
|
This repo contains Dockerfiles used for autobuilding on Dockerhub.
|
||||||
No guarantee for completeness or functionality.
|
No guarantee for completeness or functionality.
|
||||||
|
|
||||||
|URL|Folder|Description|x86_64|arm32v7|aarch64|
|
| URL | Folder | Description | x86_64 | aarch64 |
|
||||||
|:--|:-----|:----------|:----:|:-----:|:-----:|
|
| :-- | :----- | :---------- | :----: | :-----: |
|
||||||
|[dragonchaser/webtest](https://hub.docker.com/r/dragonchaser/webtest)|webtest|A small container running ruby WebRick and serves static content from /web|x|x||
|
| [dragonchaser/webtest](https://hub.docker.com/r/dragonchaser/webtest) | webtest | A small container running ruby WebRick and serves static content from /web | x | x |
|
||||||
|[dragonchaser/motsognir](https://hub.docker.com/r/dragonchaser/motsognir) |motsognir|A container for the motsognir gopher server|x|x||
|
| [dragonchaser/motsognir](https://hub.docker.com/r/dragonchaser/motsognir) | motsognir | A container for the motsognir gopher server | x | x |
|
||||||
|[ghcr.io/dragonchaser/ghrunner](https://github.com/dragonchaser/dockerhub-autobuild/pkgs/container/ghrunner)|ghrunner |A container for running github runners |x| |x|
|
| [dragonchaser/unbound](https://hub.docker.com/r/dragonchaser/unbound) | motsognir | A container for unbound dns | x | x |
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM ubuntu:latest
|
|
||||||
COPY entrypoint.sh /
|
|
||||||
ENV TZ=Europe/Berlin
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get -y install \
|
|
||||||
curl \
|
|
||||||
libdigest-sha-perl \
|
|
||||||
tzdata \
|
|
||||||
sudo
|
|
||||||
RUN useradd -ms /bin/bash runner
|
|
||||||
RUN usermod -aG sudo runner
|
|
||||||
WORKDIR /runner
|
|
||||||
RUN chown runner:runner /runner -Rfv
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
# GHRUNNER
|
|
||||||
|
|
||||||
This is a small Dockerfile providing a github runner.
|
|
||||||
The images can be found `ghcr.io/dragonchaser/ghrunner:latest`.
|
|
||||||
Supported arches are:
|
|
||||||
- aarch64
|
|
||||||
- amd64
|
|
||||||
|
|
||||||
## Environment variables
|
|
||||||
```terminal
|
|
||||||
| Variable | Values | default |
|
|
||||||
|------------+----------------------------------------+----------------|
|
|
||||||
| `TOKEN` | token for runner from github | <unset> |
|
|
||||||
| `ARCH` | arm64, x64 | x64 |
|
|
||||||
| `OS` | linux,osx | linux |
|
|
||||||
| `ORG` | name of the github org | <unset> |
|
|
||||||
| `REPO` | name of the github repo | <unset> |
|
|
||||||
| `VERSION` | version of the github runner to user | 2.280.3 |
|
|
||||||
| `CHECKSUM` | checksum for the github runner version | valid checksum |
|
|
||||||
```
|
|
||||||
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
ARCH=${ARCH:-x64}
|
|
||||||
VERSION=${VERSION:-2.280.3}
|
|
||||||
CHECKSUM=${CHECKSUM:-69dc323312e3c5547ba1e1cc46c127e2ca8ee7d7037e17ee6965ef6dac3c142b}
|
|
||||||
ORG=${ORG:-dragonchaser}
|
|
||||||
REPO=${REPO:-dockerhub-autobuild}
|
|
||||||
OS=${OS:-linux}
|
|
||||||
|
|
||||||
if [ -z "${ORG}" ]; then
|
|
||||||
echo "missing ORG, bailing out!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${REPO}" ]; then
|
|
||||||
echo "missing REPO, bailing out!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${TOKEN}" ]; then
|
|
||||||
echo "missing TOKEN, bailing out!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
FILE="actions-runner-${OS}-${ARCH}-${VERSION}.tar.gz"
|
|
||||||
curl -o ${FILE} -L https://github.com/actions/runner/releases/download/v${VERSION}/${FILE}
|
|
||||||
echo "${CHECKSUM} ${FILE}" | shasum -a 256 -c
|
|
||||||
tar xzf ./${FILE}
|
|
||||||
./bin/installdependencies.sh
|
|
||||||
su runner -c "./config.sh --unattended --url https://github.com/${ORG}/${REPO} --token ${TOKEN} --name docker-runner-$(hostname) --labels=${ARCH},${OS},self-hosted"
|
|
||||||
while true; do
|
|
||||||
su runner -c "./run.sh"
|
|
||||||
done
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
LABEL maintainer="dragonchaser <motsognir@datenschmutz.space>"
|
LABEL maintainer="dragonchaser <autobuilds@datenschmutz.space>"
|
||||||
ENV VERSION=1.0.13
|
ENV VERSION=1.0.13
|
||||||
ENV TARBALL="motsognir-${VERSION}.tar.xz"
|
ENV TARBALL="motsognir-${VERSION}.tar.xz"
|
||||||
EXPOSE 70
|
EXPOSE 70
|
||||||
@@ -9,7 +9,7 @@ WORKDIR /build
|
|||||||
RUN wget "https://downloads.sourceforge.net/project/motsognir/v${VERSION}/${TARBALL}" \
|
RUN wget "https://downloads.sourceforge.net/project/motsognir/v${VERSION}/${TARBALL}" \
|
||||||
&& tar xfv "${TARBALL}"
|
&& tar xfv "${TARBALL}"
|
||||||
RUN cd $(echo "${TARBALL}" | sed -e "s/.tar.xz//g") && make all && make install
|
RUN cd $(echo "${TARBALL}" | sed -e "s/.tar.xz//g") && make all && make install
|
||||||
RUN apt-get -y purge wget build-essential
|
RUN apt-get -y purge build-essential
|
||||||
RUN rm -Rfv /etc/apt/sources.list.*
|
RUN rm -Rfv /etc/apt/sources.list.*
|
||||||
RUN rm -Rfv /build
|
RUN rm -Rfv /build
|
||||||
RUN useradd -ms /bin/bash -d /gopher gopher
|
RUN useradd -ms /bin/bash -d /gopher gopher
|
||||||
|
|||||||
@@ -4,16 +4,16 @@ A container for the motsognir gopher server http://motsognir.sourceforge.net/
|
|||||||
|
|
||||||
## Running locally
|
## Running locally
|
||||||
|
|
||||||
**x86_64**
|
**amd64**
|
||||||
|
|
||||||
```
|
```
|
||||||
$> docker run -p 70:70 -v /path/to/you/local/gopherfolder:/gopher dragonchaser/motsognir:latest
|
$> docker run -p 70:70 -v /path/to/you/local/gopherfolder:/gopher dragonchaser/motsognir:latest-amd64
|
||||||
```
|
```
|
||||||
|
|
||||||
**arm32v7**
|
**arm64**
|
||||||
|
|
||||||
```
|
```
|
||||||
$> docker run -p 70:70 -v /path/to/you/local/gopherfolder:/gopher dragonchaser/motsognir:latest-arm32v7
|
$> docker run -p 70:70 -v /path/to/you/local/gopherfolder:/gopher dragonchaser/motsognir:latest-arm64
|
||||||
```
|
```
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
|
|||||||
8
unbound/Dockerfile
Normal file
8
unbound/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
FROM debian:latest
|
||||||
|
LABEL maintainer="dragonchaser <autobuilds@datenschmutz.space>"
|
||||||
|
EXPOSE 5335/udp
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y install unbound netcat-traditional
|
||||||
|
COPY unbound/config.conf /etc/unbound/unbound.conf.d/
|
||||||
|
COPY unbound/entrypoint.sh /
|
||||||
|
ENTRYPOINT /entrypoint.sh
|
||||||
29
unbound/README.md
Normal file
29
unbound/README.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# unbound
|
||||||
|
|
||||||
|
A container for unbound https://github.com/NLnetLabs/unbound
|
||||||
|
|
||||||
|
## Running locally
|
||||||
|
|
||||||
|
**amd64**
|
||||||
|
|
||||||
|
```
|
||||||
|
$> docker run \
|
||||||
|
-p 53:53 \
|
||||||
|
-v /path/to/you/local/unboundfolder/conf:/etc/unbound \
|
||||||
|
-v /path/to/you/local/unboundfolder/lib:/var/lib/unbound \
|
||||||
|
dragonchaser/unbound:latest-amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
**arm64**
|
||||||
|
|
||||||
|
```
|
||||||
|
$> docker run \
|
||||||
|
-p 53:53 \
|
||||||
|
-v /path/to/you/local/unboundfolder/conf:/etc/unbound \
|
||||||
|
-v /path/to/you/local/unboundfolder/lib:/var/lib/unbound \
|
||||||
|
dragonchaser/unbound:latest-arm64
|
||||||
|
``**
|
||||||
|
|
||||||
|
***Note:***
|
||||||
|
|
||||||
|
The container will expose the dns port on 5335.
|
||||||
48
unbound/config.conf
Normal file
48
unbound/config.conf
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
server:
|
||||||
|
access-control: 0.0.0.0/0 allow
|
||||||
|
interface: 0.0.0.0
|
||||||
|
port: 5335
|
||||||
|
do-ip6: no
|
||||||
|
do-ip4: yes
|
||||||
|
do-udp: yes
|
||||||
|
do-tcp: yes
|
||||||
|
# Set number of threads to use
|
||||||
|
num-threads: 8
|
||||||
|
# Hide DNS Server info
|
||||||
|
hide-identity: yes
|
||||||
|
hide-version: yes
|
||||||
|
# Limit DNS Fraud and use DNSSEC
|
||||||
|
harden-glue: yes
|
||||||
|
harden-dnssec-stripped: yes
|
||||||
|
harden-referral-path: yes
|
||||||
|
use-caps-for-id: yes
|
||||||
|
harden-algo-downgrade: yes
|
||||||
|
qname-minimisation: yes
|
||||||
|
aggressive-nsec: yes
|
||||||
|
rrset-roundrobin: yes
|
||||||
|
# Minimum lifetime of cache entries in seconds
|
||||||
|
cache-min-ttl: 300
|
||||||
|
# Configure TTL of Cache
|
||||||
|
cache-max-ttl: 14400
|
||||||
|
# Optimizations
|
||||||
|
msg-cache-slabs: 8
|
||||||
|
rrset-cache-slabs: 8
|
||||||
|
infra-cache-slabs: 8
|
||||||
|
key-cache-slabs: 8
|
||||||
|
serve-expired: yes
|
||||||
|
serve-expired-ttl: 3600
|
||||||
|
edns-buffer-size: 1232
|
||||||
|
prefetch: yes
|
||||||
|
prefetch-key: yes
|
||||||
|
unwanted-reply-threshold: 10000000
|
||||||
|
# Set cache size
|
||||||
|
rrset-cache-size: 256m
|
||||||
|
msg-cache-size: 128m
|
||||||
|
# increase buffer size so that no messages are lost in traffic spikes
|
||||||
|
#so-rcvbuf: 1m
|
||||||
|
private-address: 192.168.0.0/16
|
||||||
|
private-address: 169.254.0.0/16
|
||||||
|
private-address: 172.16.0.0/12
|
||||||
|
private-address: 10.0.0.0/8
|
||||||
|
private-address: fd00::/8
|
||||||
|
private-address: fe80::/10
|
||||||
3
unbound/entrypoint.sh
Executable file
3
unbound/entrypoint.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
unbound-checkconf
|
||||||
|
unbound -d
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
LABEL maintainer="dragonchaser <crichter@suse.de>"
|
LABEL maintainer="dragonchaser <autobuilds@datenschmutz.space>"
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y ruby \
|
&& apt-get install -y ruby \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir /web \
|
&& mkdir /web \
|
||||||
&& chmod 0777 /web
|
&& chmod 0777 /web
|
||||||
COPY ./entrypoint.sh /bin
|
COPY ./webtest/entrypoint.sh /bin
|
||||||
COPY ./index.html /web
|
COPY ./webtest/index.html /web
|
||||||
WORKDIR /web
|
WORKDIR /web
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENTRYPOINT entrypoint.sh
|
ENTRYPOINT entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user