diff --git a/docs/source/docker.rst b/docs/source/docker.rst
new file mode 100644
--- /dev/null
+++ b/docs/source/docker.rst
@@ -0,0 +1,181 @@
+=====================
+Testing Docker Images
+=====================
+
+In Taskotron, we support two approaches on how to test Docker images: shell script or pytest.
+
+
+Shell script
+============
+Shell scripts are commonly used in testing, Docker official images have tests written in bash and
+we assume that shell script approach will be the default choice.
+
+Example bellow shows what could tests in shell can look like:
+
+.. code-block:: bash
+
+    #!/bin/bash
+
+    # setup
+    systemctl start docker
+    docker pull httpd
+    container=`docker run -d -p 80:80 httpd`
+    # wait for container
+    sleep 1s
+
+    # test 1
+    output=`netstat -lnt | awk '$6 == "LISTEN" && $4 ~ "80$"'`
+    outcome1=$([ "$output" != "" ] && echo "PASSED" || echo "FAILED")
+
+    # test 2
+    curl localhost
+    outcome2=$([ "$?" == 0 ] && echo "PASSED" || echo "FAILED")
+
+    # teardown
+    docker rm -f $container
+
+The script makes sure that docker service is running, that image is pulled from repository and then
+runs two tests. Finally, container is stopped and removed. For propagating the test outcomes
+further, we prepared `taskotron_result`, a tool that generates :ref:`resultyaml-format`.
+Consecutive usage of `taskotron_result` will append the outcome to the specified output file.
+
+.. code-block:: bash
+
+    #!/bin/bash
+
+    # variable $1 has to contain path to output file
+
+    # setup
+    systemctl start docker
+    docker pull httpd
+    container=`docker run -d -p 80:80 httpd`
+    # wait for container
+    sleep 1s
+
+    # test 1
+    output=`netstat -lnt | awk '$6 == "LISTEN" && $4 ~ "80$"'`
+    outcome1=$([ "$output" != "" ] && echo "PASSED" || echo "FAILED")
+    taskotron_result -f $1 -i httpd -t docker_image -o $outcome1 -n "listening port 80"
+
+    # test 2
+    curl localhost
+    outcome2=$([ "$?" == 0 ] && echo "PASSED" || echo "FAILED")
+    taskotron_result -f $1 -i httpd -t docker_image -o $outcome2 -n "working http"
+
+    # teardown
+    docker rm -f $container
+
+Output file now contains this ResultYAML output:
+
+.. code-block:: yaml
+
+    results:
+      - item: httpd
+        note: listening port 80
+        outcome: PASSED
+        type: docker_image
+      - item: httpd
+        note: working http
+        outcome: PASSED
+        type: docker_image
+
+
+Accompanying formula to run in taskotron:
+
+.. code-block:: yaml
+
+    name: docker_httpd
+
+    environment:
+      rpm:
+        - docker
+
+    actions:
+      - bash:
+          command: bash test.sh ${workdir}/test_output
+
+      - bash:
+          command: cat ${workdir}/test_output
+        export: test_results
+
+      - resultsdb:
+          results: ${test_results}
+
+
+
+Pytest
+======
+Pytest provides richer coding experience (e.g. fixtures, setup methods, teardown methods etc.) and
+there are projects that already use pytest for docker image testing. For ease of reusability,
+taskotron can run test suites written in pytest. For seamless integration we support xUnit format
+to propagate test results further.
+
+Example of above mentioned test, now written in python::
+
+    #!/usr/bin/env python
+
+    from time import sleep
+    import os
+    import pytest
+    import subprocess
+
+    def system(cmd):
+        ret = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
+                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
+        out, err = ret.communicate()
+        return out, err, ret.returncode
+
+    class TestDockerHttpdSimple(object):
+        def setup_method(self, test_method):
+            out, err, ret = system('docker run -d -p 80:80 httpd')
+            sleep(1) # wait for container
+            self.container = out
+
+        def teardown_method(self, test_method):
+            out, err, ret = system('docker rm -f %s' % self.container)
+
+        def test_listening_port80(self):
+            out, err, ret = system("netstat -lnt | awk '$6 == \"LISTEN\" && $4 ~ \"80$\"'")
+            assert out != ""
+
+        def test_working_http(self):
+            out, err, ret = system("curl localhost")
+            assert ret == 0
+
+
+Accompanying formula:
+
+.. code-block:: yaml
+
+    name: docker_httpd
+
+    environment:
+      rpm:
+        - docker
+        - python2-pytest
+
+    actions:
+      - bash:
+          command: systemctl start docker
+
+      - bash:
+          command: docker pull httpd
+
+      - bash:
+          command: py.test dockertest.py --junitxml=${artifactsdir}/output.xml
+
+      - xunit:
+          file: ${artifactsdir}/output.xml
+          agregation: none
+        export: test_results
+
+      - resultsdb:
+          results: ${test_results}
+
+
+Other possibilities
+===================
+Taskotron is capable of running arbitrary code (e.g. via bash directive) in any language. If you
+cannot choose between shell script and pytest, you can always write your docker tests in any other
+language you prefer. Just make sure that the test results are in format we understand --
+:ref:`resultyaml-format` or xUnit.
diff --git a/docs/source/index.rst b/docs/source/index.rst
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -32,6 +32,7 @@
    resultyaml
    disposableclients
    distgittasks
+   docker
 
 
 
diff --git a/libtaskotron/directives/xunit_directive.py b/libtaskotron/directives/xunit_directive.py
--- a/libtaskotron/directives/xunit_directive.py
+++ b/libtaskotron/directives/xunit_directive.py
@@ -36,7 +36,7 @@
 raises: |
   * :class:`.TaskotronDirectiveError`: if ``file`` was not provided or agregation
     was set to unknown type.
-version_added: 0.4.13
+version_added: 0.4.14
 """
 
 EXAMPLES = """

