The following instructions can be used to build the latest Riak version using Docker
Create a file, 'Dockerfile` containing the following content:
FROM centos:centos6 AS centos_centos6_rpm_builder
RUN yum -y install epel-release deltarpm
RUN yum -y install java-1.7.0-openjdk wget git make which gcc gcc-c++ pam-devel rpm-build https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_16.b.2.basho10-2~centos~6_amd64.rpm
WORKDIR /root/
RUN git config --global url."https://github.com/".insteadOf git@github.com: && git config --global url."https://".insteadOf git://
ARG riak_ver="riak-2.2.3"
RUN git clone git@github.com:basho/riak.git
RUN cd riak && git checkout $riak_ver
WORKDIR /root/riak
RUN make package
FROM centos:centos6
EXPOSE 8087 8098
MAINTAINER Bryan Hunt <admin@binarytemple.co.uk>
ARG riak_ver="riak-2.2.3"
WORKDIR /root/
RUN yum -y install epel-release
COPY --from=centos_centos6_rpm_builder /root/riak/distdir/packages/${riak_ver}-1.el6.x86_64.rpm .
RUN yum -y install ${riak_ver}-1.el6.x86_64.rpm
CMD cp ./*.rpm /target
Then run the following commands in the same directory:
export DIST="riak-centos-6"
export VER=2.2.4
docker build -t "${DIST}:${VER}" --build-arg riak_ver="riak-${VER}" .
docker run -v $(pwd):/target "${DIST}:${VER}"
The generated rpm files will be deposited into the working directory.
From there, you can install the packages as usual using the yum
command.