README.md 2.07 KB
Newer Older
1 2
# Knot DNS Resolver

3 4
[![Build Status](https://travis-ci.org/CZ-NIC/knot-resolver.svg?branch=master)](https://travis-ci.org/CZNIC-Labs/knot-resolver)
[![Coverage Status](https://coveralls.io/repos/CZ-NIC/knot-resolver/badge.svg?branch=master)](https://coveralls.io/r/CZNIC-Labs/knot-resolver?branch=master)
5

Marek Vavruša's avatar
Marek Vavruša committed
6 7
The Knot DNS Resolver is a minimalistic caching resolver implementation. The project provides both a resolver
library and a small daemon. Modular architecture of the library keeps the core tiny and efficient, and provides
8 9
a state-machine like API for extensions. There are two built-in modules: *iterator* and *cache*,
and each module can be flipped on and off.
10

Marek Vavruša's avatar
Marek Vavruša committed
11
### Try it out?
12

Marek Vavruša's avatar
Marek Vavruša committed
13 14 15 16 17
The Knot DNS Resolver is currently in an early development phase, you shouldn't put it in the production right away.

### Docker image

This is simple and doesn't require any dependencies or system modifications, just run:
18 19

```
Marek Vavruša's avatar
Marek Vavruša committed
20
$ docker run cznic/knot-resolver
21 22
```

Marek Vavruša's avatar
Marek Vavruša committed
23 24 25 26 27 28 29 30 31 32 33
See the build page https://registry.hub.docker.com/u/cznic/knot-resolver for more information and options.
You can hack on the container by changing the container entrypoint to shell like:

```
$ docker run -it --entrypoint=/bin/bash cznic/knot-resolver
```

### Building from sources 

The Knot DNS Resolver depends on the development version of the Knot DNS library, and a reasonably recent version of `libuv`.
Several dependencies may not be in the packages yet, the script pulls and installs all dependencies in a chroot.
34

Marek Vavruša's avatar
Marek Vavruša committed
35 36 37
You can avoid rebuilding dependencies by specifying `BUILD_IGNORE` variable, see the [Dockerfile](scripts/Dockerfile)
for example. Usually you only really need to rebuild `libknot`.

38
```
Marek Vavruša's avatar
Marek Vavruša committed
39
$ export FAKEROOT="${HOME}/.local"
Marek Vavruša's avatar
Marek Vavruša committed
40
$ export PKG_CONFIG_PATH="${FAKEROOT}/lib/pkgconfig"
Marek Vavruša's avatar
Marek Vavruša committed
41
$ ./scripts/bootstrap-depends.sh ${FAKEROOT}
42
$ make
Marek Vavruša's avatar
Marek Vavruša committed
43
$ make check
44 45
```

Marek Vavruša's avatar
Marek Vavruša committed
46
### Running
47 48 49 50 51 52 53

There is a separate resolver library in the `lib` directory, and a minimalistic daemon in
the `daemon` directory. The daemon accepts a few CLI parameters, and there's no support for configuration
right now.

```
$ ./daemon/kresolved -h
54
$ ./daemon/kresolved -a "127.0.0.1#53"
55
```