From ad5796de9febb5724bd2bf0639ae617c2ff34ba5 Mon Sep 17 00:00:00 2001 From: Tommaso Visconti Date: Wed, 4 Sep 2013 19:17:10 +0200 Subject: [PATCH] Adds instruction about UDP port redirection --- docs/sources/use/port_redirection.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/sources/use/port_redirection.rst b/docs/sources/use/port_redirection.rst index b19673af27..5c321d429d 100644 --- a/docs/sources/use/port_redirection.rst +++ b/docs/sources/use/port_redirection.rst @@ -8,7 +8,7 @@ Port redirection ================ -Docker can redirect public TCP ports to your container, so it can be +Docker can redirect public TCP and UDP ports to your container, so it can be reached over the network. Port redirection is done on ``docker run`` using the -p flag. @@ -25,6 +25,12 @@ will be allocated. # PUBLIC port 80 is redirected to PRIVATE port 80 sudo docker run -p 80:80 +To redirect a UDP port the redirection must be expressed as *PUBLIC:PRIVATE/udp*: + +.. code-block:: bash + + # PUBLIC port 5300 is redirected to the PRIVATE port 53 using UDP + sudo docker run -p 5300:53/udp Default port redirects can be built into a container with the ``EXPOSE`` build command.