RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
To support additional functionality, Dobby allows developers to create C++ plugins that can execute code at various stages of a containers lifecycle such as before creation, during startup or at container shutdown. This could be used to map devices, configure networking/iptables or setup displays. Dobby uses a mixture of custom hook-points and OCI hooks (https://github.com/opencontainers/runtime-spec/blob/master/config.md#posix-platform-hooks) to support this.
The following table shows the various hook points that a developer can use in their plugins:
Proposed Container Hooks Required for Plugin Support | |||||
---|---|---|---|---|---|
Diagram Ref # | Name | Execution Namespace | Path Resolution Namespace | When | Responsibility |
4 | postInstallation | host | host | After the OCI bundle has been downloaded to the client STB, before the runtime’s create operation is called. Only run once per container - if the container is stopped and restarted this hook does not run again Can modify the container config file | Dobby |
5 | preCreation | host | host | After postInstallation, but before the create operation is called. Is run every time the container is launched. Can modify the container config file | Dobby |
9 | createRuntime | host | host | During the create operation, after the runtime environment has been created and before the pivot root or any equivalent operation. This hook, and subsequent hooks, can not modify the container config | OCI Runtime (crun) |
10 | createContainer | container | host | During the create operation, after the runtime environment has been created and before the pivot root or any equivalent operation. | OCI Runtime (crun) |
12 | startContainer | container | container | After the start operation is called but before the user-specified program command is executed. | OCI Runtime (crun) |
14 | postStart | host | host | After the user-specified process is executed but before the start operation returns. | OCI Runtime (crun) |
16 | postHalt | host | host | When a SIGTERM signal is received from the container. Before the delete operation is called | Dobby |
20 | postStop | host | host | After the container is deleted but before the delete operation returns. | OCI Runtime (crun) |