Easy method for deploying your Python application in a Docker container.
We've created two containers which allow you to easily create Docker containers for Python programs. The default image is based around pip and will copy/install your requirements.txt file in the image at build time.
Make sure your requirements.txt
in located in the current working directory.
FROM godatadriven/python-onbuild:pip
COPY /app /app
The other image (with the conda tag), is similar but uses an environment.yml
file.
FROM godatadriven/python-onbuild:conda
COPY /app /app
On top of Python dependencies, you might have a requirement to install additional Debian packages in your Docker container.
You can do this by placing a packages.txt
file in the root of your project.
If this file is present, we will use apt to install them.
Finally, by placing a build.sh
file in the root of your project, you can run artibraty bash commands during the build process of your
Docker container.
Go to the example-usage folder to find an example of both containers, and the optional features.