Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
Creates a directory populated with rootfs based on the supplied container config. More...
#include <DobbyRootfs.h>
Public Member Functions | |
DobbyRootfs (const std::shared_ptr< IDobbyUtils > &utils, const std::shared_ptr< const DobbyBundle > &bundle, const std::shared_ptr< const DobbyBundleConfig > &config) | |
Constructor that populates the object's member variables required internally by Dobby. More... | |
bool | isValid () const |
const std::string & | path () const |
int | dirFd () const |
void | setPersistence (bool persist) |
void | unmountAllAt (const std::string &pathPrefix) |
Unmounts anything mounted at the given path prefix. More... | |
Private Member Functions | |
void | cleanUp () |
Removes the rootfs directory and all it's contents if set persistence set to false. | |
Private Attributes | |
const std::shared_ptr< IDobbyUtils > | mUtilities |
const std::shared_ptr< const DobbyBundle > | mBundle |
std::string | mPath |
int | mDirFd |
bool | mPersist |
Creates a directory populated with rootfs based on the supplied container config.
At construction time a directory is created within the bundle named 'rootfs'
It is then populated with any static files as indicated by the container config object.
At destruction time the rootfs and all it's contents are deleted.
DobbyRootfs::DobbyRootfs | ( | const std::shared_ptr< IDobbyUtils > & | utils, |
const std::shared_ptr< const DobbyBundle > & | bundle, | ||
const std::shared_ptr< const DobbyBundleConfig > & | config | ||
) |
Constructor that populates the object's member variables required internally by Dobby.
[in] | utils | The daemon utils object. |
[in] | bundle | An instance of DobbyBundle |
[in] | config | An instance of DobbyBundleConfig |
void DobbyRootfs::unmountAllAt | ( | const std::string & | pathPrefix | ) |
Unmounts anything mounted at the given path prefix.
[in] | pathPrefix | The path prefix to check against the mount points. |