FerryDocs

Python

What the generated Dockerfile does for a Python project, when you set no build or start command.

Edit on GitHub
requirements.txtpyproject.tomlPipfilepipuv, Poetry, pipPipenvImagepython:3.12-slim

With a requirements.txt, pip installs the dependencies.

1 / 3

The picture shows which installs the .

The defaults

StepWhat Ferry does
Base imageThe is python:<version>-slim. The version comes from .python-version or runtime.txt (python-3.11.4). The default is 3.12.
Install with requirements.txtpip install -r requirements.txt
Install with pyproject.tomluv when there is a uv.lock. Poetry for Poetry projects. If not, pip install . or the dependencies of the project.
Install with PipfilePipenv
BuildNone by default. Your build command runs after the install.
Startpython main.py. If that file is not there, python app.py.

For a full generated file, see the example.

On this page