Skip to content

Commit

Permalink
Merge pull request #1789 from tommyblue/patch-1
Browse files Browse the repository at this point in the history
Adds instruction about UDP port redirection
  • Loading branch information
metaliveblog committed Sep 5, 2013
2 parents d6ff912 + ad5796d commit e0d6bae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/sources/use/port_redirection.rst
Expand Up @@ -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.

Expand All @@ -25,6 +25,12 @@ will be allocated.
# PUBLIC port 80 is redirected to PRIVATE port 80
sudo docker run -p 80:80 <image> <cmd>
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 <image> <cmd>
Default port redirects can be built into a container with the
``EXPOSE`` build command.

0 comments on commit e0d6bae

Please sign in to comment.