hectcastro/docker-riak — pull request #15 by amattn (2014-05-19 20:49:11+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 DOCKER_RIAK_CLUSTER_SIZE=5 make start-cluster