Sign inSign up

godatadriven/python-onbuild

By godatadriven

•Updated almost 3 years ago

Minimal Python container which installs your requirements.txt dependencies

Image
1

4.8K

godatadriven/python-onbuild repository overview

⁠Python in Docker

Easy method for deploying your Python application in a Docker container.

⁠Using/Extending the image

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
⁠Debian packages

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.

⁠Arbitrary bash commands

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.

⁠Examples

Go to the example-usage folder to find an example of both containers, and the optional features.

Tag summary

Content type

Image

Digest

sha256:94da0cca9…

Size

189 MB

Last updated

almost 3 years ago

docker pull godatadriven/python-onbuild