Riakting to Docker

Riak is really for me the true key value store that epitomizes everything about a distributed database system. I had presented about it in Feb 2010.

Distributed Key-Value Stores- Featuring Riak from samof76

Docker is this new thing on the block with this fantastic mechanics of delivering packages are self contained the images ready to run anywhere docker is installed(linux).

Now here is the Dockerfile on how to create a docker image with Riak in it.

FROM ubuntu:12.04
RUN apt-get update
RUN apt-get install -y curl lsb-release
RUN curl http://apt.basho.com/gpg/basho.apt.key | apt-key add -
RUN bash -c "echo deb http://apt.basho.com $(lsb_release -sc) main > /etc/apt/sources.list.d/basho.list"
RUN apt-get update
RUN apt-get install -y riak

The above docker file gist is available here.

Why ubuntu:12.04 and not ubuntu:latest? #

The there is not build candidate of riak for the latest LTS release of the Ubuntu, Trusty. Yes, the Riak documentation, does not explicitly mention.

Why install curl and lsb-release? #

These packages are not part of the base ubuntu docker images. I presume at least lsb-release should be, and why not curl as well.

How to create an image from this Dockerfile? #

I put this in a directory, exclusively created for the build. And then from inside that dicrectory I run this command.

$ sudo docker build -t samof76/riak .

How to run an instance of this container? #

This is the simplest way but there could be other options depending on the need.

$ sudo docker run -i -t samof76/riak /bin/bash

Since this is pushed to the docker repository hub, it could run from anywhere there is docker installed.

 
1
Kudos
 
1
Kudos

Now read this

Need a Print

This morning, at around 8 am, there was a frantic call from my cousin’s husband asking if I was home, so they could stop over for a print. My cousin and her family were on their way to the US Consulate for a Visa interview, and they... Continue →