Closed mokuki082 closed 5 years ago
Runc actually makes a lot of assumptions on the filesystem. It saves the container information at /run/runc
if the container is created by root user, and a custom location otherwise. There are also other dependencies such as unix socket location (which seems to be relied heavily by docker and runc), rootfs, config path, not mentioning one of the underlying technology: cgroups relies on a virtual fs as its API. Runc already has the config file parser set up, is it really worth it to go through the hassle of serialising the entire config file for the sake of not interacting with the filesystem?
According to OCI Runtime Operations Specification, to have the bare minimum container runtime we need the following operations:
Notation: API-name(<arg1>, <arg2>...): <return-value>
state(container-id): (State, error)
create(container-id, bundle-path): error
config.json
and the container filesystem.config.json
are applied except process
.process.args
MUST NOT be applied until triggered by start
process
properties MAY be applied.config.json
after this operation will not effect the container.mounts
like thisstart(container-id): error
process
.kill(container-id, Signal): error
delete(container-id): error
stopped
MUST generate an error.Closing this as we are utilising RunC as a whole, hence the API would be the same as RunC's commands.
Design an API for create/start/delete/kill/stat for containers.
Take into consideration that: