tim-mit/docker — pull request #1 by tim-mit (2014-02-10 23:24:37+00:00)
Title: Add aliases for exposed ports [#2435]

Provides the ability to name any ports that are exposed through ``-p``, ``-expose`` or ``EXPOSE``, implementing https://github.com/dotcloud/docker/issues/2435.

The addition lets you declare aliases as;
```
# Manually declared
docker run -p 80#webserver
docker run -expose 80/tcp#webserver

# In a Dockerfile
EXPOSE 80#webserver
```
and any linked containers will then have the additional env vars exposed as;

```
_WEBSERVER=tcp://172.17.0.2:80
_WEBSERVER_ADDR=172.17.0.2
_WEBSERVER_PORT=80
_WEBSERVER_PROTO=tcp
```

Docker-DCO-1.1-Signed-off-by: Tim Toomey (github: tim-mit)