Refactoring to use Docker sockets directly as well as fork() to call processes instead of opening shells

This commit is contained in:
mrkmntal 2026-08-14 12:49:10 -04:00
commit 802550f6e7
9 changed files with 720 additions and 1229 deletions

View file

@ -0,0 +1,23 @@
#pragma once
#include <string>
struct EngineResponse {
int status_code = 0;
std::string body;
std::string error;
bool ok() const { return status_code >= 200 && status_code < 300 && error.empty(); }
};
class DockerEngineClient {
public:
explicit DockerEngineClient(std::string socket_path = "/var/run/docker.sock");
EngineResponse request(const std::string& method,
const std::string& path,
const std::string& body = {}) const;
private:
std::string socket_path_;
};