Beem-In-A-Box: Steem / Hive Python Library Docker Build (for the Technically Impaired) - Dockerfile Included

in OpenSource4 years ago

q72k0w.jpg

Docker Hub Repository

https://hub.docker.com/repository/docker/anthonyadavisii/beem-box

     Hive may have got theBeem-In-A-Box Intro Post but don't you fret, my friends, that still linger here. You get the eSTEEMed privilege of seeing the Dockerfile used which helps to understand the process involved in this resource for both chains.

I don't discriminate but rather strive to offer content that is exclusive for each chain.

What? Do you think I am playing some sort of Mommy / Daddy games so I may receive maximized return for my effort? 😲

Bet your ASS I AM!

        I mean let's be for real here. We all want reasonable compensation for the time we spent here. This is why my approach to posting will be tuned to my usual rewards. The general idea is segmentation of content.

    Let's say one of my fellow techies does some modest system administrator level work for the chain. Instead of documenting everything in one massive post that may be overlooked, we break things up into payouts that will more closely correspond with the value added to the network. Personally, this is something we should all consider if we do value our time. I know some of us get paid the big bucks in the real world so why sell yourself short while others just shitpost?

Anyways, that's enough of me on my soapbox about fair rewards. Let's move on to the Dockerfile.

dcelof.png

I went ahead and added some comments and will likely be putting this on GitHub.com when I have a moment.

FROM python:3.6
# mount folder from host OS
ADD /app /app
# install prerequisite packages
RUN apt-get update && apt-get install -y \
    build-essential \
    libssl-dev \
    python-dev
WORKDIR /app
# install python module requirements
RUN pip install --requirement /app/requirements.txt

There are a few things you need to have in place before you build your image.

  1. Obviously need to have the Dockerfile in the directory in which you will be building the image. It must be capital 'D' with no extension for it to be recognized by Docker.

  2. Create an /app/ subdirectory and then place your python requirements.txt into it. I used a combination of what @holger80 has on GitHub for Beem as a just in case to not miss any necessary modules although I do expect a few in this list are optional.

https://github.com/holgern/beem/blob/master/requirements-test.txt

    I also referenced setup.py's requires variable as well. Basically, anything in the requirements-test that had a version associated took precedence in the case of conflict in which case the line item without a version would be removed. The results were as follows:

Beware Wall of Text Incoming!

goasxv.gif

setuptools
wheel
future==0.18.2
ecdsa==0.15
requests==2.23.0
websocket-client==0.57.0
pytz==2019.3
pycryptodomex==3.9.7
scrypt==0.8.13
Events==0.3
cryptography==2.8
pyyaml>=4.2b1
mock==4.0.2
appdirs==1.4.3
Click==7.1.1
prettytable
pycodestyle==2.5.0
pyflakes==2.1.1
pylibscrypt==1.8.0
six==1.14.0
pytest
pytest-mock
pytest-cov
coverage
parameterized
tox
codacy-coverage
virtualenv
codecov
beem

Save the above as requirements.txt, place into your app directory, and you're ready to BUILD!

7qzn3y.png

And that's all there is to it. Perhaps some things can be trimmed out but for a little under a GB, think I fared OK on my first Docker Hub image.

What do you think? If you found this post or the external resources and labor to be beneficial to the Steem blockchain, it would mean a lot if you would give me a upvote, resteem, follow, and all that jazz!🎷

Appreciate you stopping by! Looking forward to more cool stuff I'll be able to create using Docker containerization for my application development. Until then, I'll be AFK for a bit taking advantage of the Killing Floor 2 Double XP Event for the "Neon Nightmare" release.

If you wanna check it out, it's only $9.99 on Steam right now (Yeah the other one lol). Here is the link to their Community Hub if you want to learn more about my main squeeze w Coop Survival Horror FPSes. I'll likely get a game share going on the Artist Formerly known as SteemFlagRewards Discord.

See yall around the chain!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.032
BTC 69425.42
ETH 3746.80
USDT 1.00
SBD 3.77