doos 0.1.0: user-level overlayfs containers with slirp networking

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 20:54:55 +02:00
co-authored by Claude Sonnet 5.5
commit 36f4f890c7
21 changed files with 1418 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include <string>
#include <vector>
#include "container.hpp"
#include "util.hpp"
namespace doos {
// Runs a command inside a container: starts the namespaces if the container is
// stopped, joins them if it is already running. Returns the command's exit code.
class Sandbox {
public:
Sandbox(Container container, std::vector<std::string> command)
: container_(std::move(container)), command_(std::move(command)) {}
int run();
private:
int start(FileLock& lock);
int join(pid_t initPid, FileLock& lock);
Container container_;
std::vector<std::string> command_;
};
} // namespace doos