FerryDocs

Generated Dockerfiles

For a project with no Dockerfile, Ferry writes one. Its name is Dockerfile.ferry.

Edit on GitHub

Base image. A small official image of the language.

1 / 4
Each generated Dockerfile has the same four parts

The and the change less often than your code. Thus Docker keeps their in the cache.

An example

The project examples/python-hello has a requirements.txt and a with web: python app.py. Ferry writes this file:

Dockerfile.ferry
# Generated by Ferry: Python app.
# Commit your own Dockerfile to customize the build.
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1 \
    PIP_ROOT_USER_ACTION=ignore
WORKDIR /app

COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["/bin/sh","-c","python app.py"]

Change the result

The generated file exists only during the build. To change the build, commit your own Dockerfile. Then Ferry uses your file.

On this page