You are viewing a single comment's thread from:

RE: STEEM blockchain access with Python: setting up steem-python with Docker

in #steemit7 years ago

Thanks for the tips! You saved me lots of time, so here you have a Dockerfile based on your post:

#
# dropahead steempy container
#
# VERSION               0.0.1
#

FROM python:3

# Update packages
RUN apt-get update
RUN apt-get upgrade -y

# Install steempy
RUN pip install -U steem

# Patch steempy metadata
RUN sed -i 's/0.9.3.1/0.9.3/' /usr/local/lib/python3.6/site-packages/steem-0.18.103.dist-info/METADATA

# Start supervisor
CMD ["/bin/sh"]
Sort:  

glad it helped!
You could even reduce this file to

FROM python:3
RUN pip install -U steem
RUN sed -i 's/(==0.9.3.1)/(==0.9.3)/g' /usr/local/lib/python3.6/site-packages/steem*/METADATA

apt-get update/upgrade is not necessarily needed (for steem-python to work - security is a different aspect). And with the wildcard in the sed command you should be safe with steem-python version bumps.