Last active
May 19, 2016 19:01
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine | |
MAINTAINER Jon Brisbin <[email protected]> | |
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", "-"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
eval $(weave env) | |
docker run --rm -i riak-python <<EOF | |
import riak | |
cl = riak.RiakClient(host='riak') | |
print cl.ping() | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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