Skip to content

Instantly share code, notes, and snippets.

@jbrisbin
Last active May 19, 2016 19:01
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 jbrisbin/b81e643fcda83b703779cb4caf2fc555 to your computer and use it in GitHub Desktop.
Save jbrisbin/b81e643fcda83b703779cb4caf2fc555 to your computer and use it in GitHub Desktop.
Dockerfile for creating an Alpine-based image for accessing Riak Time Series via the Python client
FROM alpine
MAINTAINER Jon Brisbin <jbrisbin@basho.com>
RUN \
apk add --update python py-six py-setuptools curl unzip
RUN \
cd /usr/lib/python2.7/site-packages && \
curl -sSLO https://pypi.python.org/packages/2.7/r/riak/riak-2.4.2-py2.7.egg && \
curl -sSLO https://pypi.python.org/packages/2.7/p/protobuf/protobuf-2.6.1-py2.7.egg && \
unzip -o riak-2.4.2-py2.7.egg && \
unzip -o protobuf-2.6.1-py2.7.egg
WORKDIR $HOME
ENTRYPOINT ["python", "-"]
#!/bin/bash
eval $(weave env)
docker run --rm -i riak-python <<EOF
import riak
cl = riak.RiakClient(host='riak')
print cl.ping()
EOF
#!/bin/bash
eval $(weave env)
docker run -d -P --name riak basho/riak-ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment