Create Docker image of Python package

  docker, dockerfile, package, python, python-packaging

I have created a Python package, with its functions, requirements.txt and setup.py. Now I would like to build a Docker container for my Python package, so users can refer to this container to install the package and use it.

However, I don’t know how to structure exactly this process.
Firstly, I was thinking of a similar Dockerfile:

FROM python:VERSION

INSTALL DEPENENCIES

# install the package
RUN python setup.py install 

Secondly, how could the user use this container? Should it be run or pulled?
Thanks

Source: Python Questions

LEAVE A COMMENT