Skip to content

Instantly share code, notes, and snippets.

@TJC
Created October 22, 2015 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TJC/cb3184705bc0eacde885 to your computer and use it in GitHub Desktop.
Save TJC/cb3184705bc0eacde885 to your computer and use it in GitHub Desktop.
Dockerfile for Riak, Riak CS and Stanchion
FROM ubuntu:trusty
MAINTAINER tobyc@strategicdata.com.au
ENV DEBIAN_FRONTEND noninteractive
VOLUME /var/lib/riak
EXPOSE 4369 8080 8087 8098 8099
COPY 99-http-proxy /etc/apt/apt.conf.d/
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y curl
RUN curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | bash
RUN curl -s https://packagecloud.io/install/repositories/basho/riak-cs/script.deb.sh | bash
RUN curl -s https://packagecloud.io/install/repositories/basho/stanchion/script.deb.sh | bash
RUN apt-get install -y riak riak-cs stanchion
ADD run_riak.sh /
ADD run_riak-cs.sh /
ADD run_stanchion.sh /
CMD /run_riak.sh
#!/bin/bash
find /var/lib/riak -name "bitcask.*.lock" -delete
/usr/sbin/riak console
@TJC
Copy link
Author

TJC commented Oct 22, 2015

Note that as it stands, this will only work with Docker run --net=host
Two reasons.
1)
Due to Erlang/OTP creating a whole lot of ports at random ports.
Once I get this working, I'm intending to lock the Erlang ports to a specific range which is then included in the port range in the Dockerfile.

The requirement of connecting by persistent node names.
--net=host uses the host's hostname, not a random checksum.

@hectcastro
Copy link

Can you post the contents of the .sh scripts as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment