Giter VIP home page Giter VIP logo

pythonunbound's Introduction

pythonunbound

A simple Dockerfile that builds Unbound --with-pythonmodule support and includes a simple Hello World style Python # module to demonstrate the --with-pythonmodule functionality using Python 3.6.

Hello World

$ docker run -it nlnetlabs/pythonunbound
root@nnn:/usr/local/etc/unbound#: unbound
root@nnn:/usr/local/etc/unbound#: dig +noall +answer @127.0.0.1
helloworld.  300 IN A 127.0.0.1

Develop and test your own Python module for Unbound

Edit the helloworld.py or your own Python module file, reload Unbound then submit DNS queries to the locally running Unbound process to see your module in action. Running Unbound in the foreground with lots of diagnostic output will probably be useful while developing, e.g.:

docker run -it nlnetlabs/pythonunbound
root@nnn:/usr/local/etc/unbound#: unbound -dd -vvvv

Then in another terminal get the container ID with docker ps then connect to it like so:

docker exec -it <container id> /bin/bash
root@nnn:/usr/local/etc/unbound#: dig +noall +answer @127.0.0.1
helloworld.  300 IN A 127.0.0.1

Building a different version of Unbound

Rather than use the stock version of the image hosted at Docker Hub, you can rebuild the image yourself against any unbound-X.Y.Z.tar.gz available at https://nlnetlabs.nl/downloads/unbound/ by specifying the UNBOUND_VERSION build argument to the docker build command.

For example, to build the image using Unbound 1.8.0:

  1. Clone this repository and CD into the clone directory.
  2. Build the image: docker build --bulld-arg UNBOUND_VERSION=1.8.0 .

END

pythonunbound's People

Contributors

ximon18 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.