hectcastro/docker-riak — pull request #16 by amattn (2014-05-19 20:55:32+00:00)
Title: support for user defined ports via DOCKER_RIAK_BASE_HTTP_PORT

Our system currently needs fixed riak ports. This pull request adds the ability to do so via an environment variable.

Thank you,

From the comments:

The default port config is -P, which means that docker with assign
arbitrary ports for riak to use. These are usually in the 49xxx range.

if DOCKER_RIAK_BASE_HTTP_PORT is set, then we will manually forward
port number $DOCKER_RIAK_BASE_HTTP_PORT + $index to 8098
and forward $DOCKER_RIAK_BASE_HTTP_PORT + $index + $DOCKER_RIAK_PROTO_BUF_PORT_OFFSET to 8087
DOCKER_RIAK_PROTO_BUF_PORT_OFFSET is optional and defaults to 100

example usage:

DOCKER_RIAK_BASE_HTTP_PORT=8800 DOCKER_RIAK_AUTOMATIC_CLUSTERING=1 make start-cluster