Skip to content

Add dockerized knowledge base example #37

Description

@DaviddeBest-TNO

Summary

There is no example showing how to dockerize a user's Knowledge Base application using the current SDK. The root Dockerfile is a legacy artifact referencing setup.py, dev-requirements.txt, and the old config-driven entrypoint. The existing examples/legacy/ Docker examples use the old API.

Users need a clear, modern example of how to containerize a KB app and run it alongside a Smart Connector using Docker Compose.

Scope

New example: examples/10-dockerized/

Create a new numbered example that demonstrates how to dockerize a simple ANSWER Knowledge Base (similar to 01-basic.py) with:

  • A Dockerfile that installs knowledge_mapper and runs the KB app
  • A compose.yaml that starts:
    • A Knowledge Directory
    • A Smart Connector (KE runtime)
    • The dockerized KB application
  • A simple Python KB app using the SDK-style API
  • A README.md explaining how to build and run the example

The focus should be on demonstrating the Docker workflow (Dockerfile, Compose, networking between the KB and the SC), not complex KB logic. Users can combine this pattern with other examples.

Remove root Dockerfile

Delete the outdated root Dockerfile (or replace it with a pointer to the new example). The current root Dockerfile references files that no longer exist (dev-requirements.txt, MANIFEST.in, the old knowledge_mapper/ directory at root level).

Acceptance Criteria

  • examples/10-dockerized/ exists with a working Dockerfile, compose.yaml, Python app, and README
  • Running docker compose up in the example directory successfully starts the KB, SC, and KD
  • The KB registers with the SC and handles at least one interaction
  • The root Dockerfile is deleted or replaced with a reference to the new example
  • The example follows the same conventions as other examples in examples/

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions