Dockerizing a Riak service (Engine)

Dockerizing a Riak service

The goal of this example is to show you how to build a Docker image with Riak pre-installed.

Creating a Dockerfile

Create an empty file called Dockerfile:

$ touch Dockerfile

Next, define the parent image you want to use to build your image on top of. We’ll use Ubuntu (tag: trusty), which is available on Docker Hub:

# Riak
#
# VERSION       0.1.1

# Use the Ubuntu base image provided by dotCloud
FROM ubuntu:trusty
MAINTAINER Hector Castro hector@basho.com

After that, we install the curl which is used to download the repository setup script and we download the setup script and run it.

# Install Riak repository before we do apt-get u