dotcloud/docker-registry — pull request #461 by sprin (2014-07-06 09:23:11+00:00)
Title: Allow S3 host, port, calling format to be specified to enable S3-compatible backends, such as Riak CS

This adds S3_HOST, S3_PORT, S3_CALLING_FORMAT env vars to be passed through to boto's [S3Connection](http://boto.readthedocs.org/en/latest/ref/s3.html#boto.s3.connection.S3Connection) constructor.

S3_CALLING_FORMAT takes a boto CallingFormat class as a string, such as ["boto.s3.connection.OrdinaryCallingFormat"](http://boto.readthedocs.org/en/latest/ref/s3.html?highlight=callingformat#boto.s3.connection.OrdinaryCallingFormat).

This allows connection to any S3-compatible backend, such as Riak CS.

Also adds a BOTO_DEBUG env var to allow setting the [Boto log level](http://boto.readthedocs.org/en/latest/boto_config_tut.html#boto).

Tested by building docker-registry image and deploying against a Riak CS backend using the [hectcastro/riak-cs](https://registry.hub.docker.com/u/hectcastro/riak-cs/) image.

**Why?**
My experience with setting up object store backends was zero prior to today. I started with Swift, and I did not find any Docker images that appeared to be fully-baked. The complexity and dependencies of Swift discouraged me from making my own image. Moving on to Riak CS, I located the [riak-cs](https://registry.hub.docker.com/u/hectcastro/riak-cs/) image put together by a Basho engineer. I have found it to be functional and well-documented.

This seems like an easy and elegant solution for those looking to hook up a Docker registry to an open source distributed object store.