+.. _deployment-docker:
+
******
Docker
******
.. code-block:: bash
- $ docker run --rm -ti --network host docker.io/cznic/knot-resolver:6
+ $ docker run --rm -ti --network host docker.io/cznic/knot-resolver
For more robust deployments you will also probably need to configure network, for that see `Docker networking <https://docs.docker.com/engine/network/>`_.
.. code-block:: bash
$ docker volume create config
- $ docker run --rm -ti --network host -v config:/etc/knot-resolver docker.io/cznic/knot-resolver:6
+ $ docker run --rm -ti --network host -v config:/etc/knot-resolver docker.io/cznic/knot-resolver
After a configuration change there is no need to restart the entire container, just tell the resolver to reload the configuration.
Get ``CONTAINER_ID`` using the ``docker ps`` command or give your container name with the ``--name`` argument at container startup.
.. code-block:: bash
$ docker volume create --opt type=tmpfs --opt device=tmpfs cache
- $ docker run --rm -ti --pid=host --network host -v cache:/var/cache/knot-resolver docker.io/cznic/knot-resolver:6
+ $ docker run --rm -ti --pid=host --network host -v cache:/var/cache/knot-resolver docker.io/cznic/knot-resolver
.. code:: bash
- sudo docker run -ti --net=host docker.io/cznic/knot-resolver:6
+ sudo docker run --rm -ti --network host docker.io/cznic/knot-resolver
+
+ More about Docker deployments can be found in :ref:`deployment-docker` section.
If for some reason you need to install Knot Resolver **from sources**,
check out `building from sources <./dev/build.html>`_ section in developer documentation.