Skip to content

Custom Docker Image

You can integrate a custom module with minimal changes by extending the existing Docker image.

Example flow

  1. Copy an example module such as invertcontrast.py and implement your logic.
  2. Add an optional JSON config file.
  3. Create a lightweight Dockerfile based on kspacekelvin/fire-python.

See the custom/ folder for a working example:

Build from the custom/ folder:

docker build --no-cache -t fire-python-custom -f custom.dockerfile ./

The base images kspacekelvin/fire-python and kspacekelvin/fire-python-devcon can be used as starting points. The custom Dockerfile generally only needs to copy the module and optional JSON file and install additional dependencies.

The example filter.py applies the SciPy median filter. Compare it with invertcontrast.py from the reference commit. The accompanying filter.json configures the median-filter window size.