A docker ambassador for container linking.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Docker Ambassador

For information about the docker ambassador linking pattern check out this link here. The docker repository for this is located here.


To start from scratch you need to first build the busybox image. The script mkrootfs.sh is a helper to build rootfs.tar. The tarmaker installs the busybox-static Ubuntu package and uses it as the base for the newly built image. Beyond that, it also includes the socat binary.^1

cd ./busybox
docker build -t busybox .

Once built, you can run it with:

docker run -t -i busybox


Once you have the busybox built you can use the Dockerfile ^2 in the root of this repository to build the ambassador:

docker build -t reedd/ambassador .
docker tag reedd/ambassador ambassador

To run it on a remote host, you can use:

docker run -t -i \
    -name redis_ambassador \
    -expose 6379 \
    -e REDIS_PORT_6379_TCP=tcp://<DOMAIN OR IP ADDRESS>:6379 \

Here is another example with MySQL:

docker run -t -i \
    -name sql_ambassador \
    -expose 3306 \
    -e MYSQL_PORT_3306_TCP=tcp://<DOMAIN OR IP ADDRESS>:3306 \

If you want to access your ambassador locally you can simply add the -p option with the ports you'd like to use i.e. -p 3306:3306.

Docker Machine Notes

If you want the ambassador to connect to the localhost of the machine that's running your Docker Machine VM you can do it with the IP address

docker run -t -i \
    -name sql_ambassador \
    -p 3306:3306 \
    -expose 3306 \
    -e MYSQL_PORT_3306_TCP=tcp:// \