Enhance Docker integration and API for container management

- Implemented Docker container scanning and periodic updates in the Server initialization.
- Added new RPC endpoints for managing Docker containers, including start, stop, and restart functionalities.
- Updated the API to handle package management for Docker-based applications.
- Improved environment variable handling for user-specific configurations in Podman and Docker clients.
- Enhanced the development startup script to include Docker container management and provide clearer instructions for full stack setup.
This commit is contained in:
Dorian
2026-01-27 23:21:26 +00:00
parent 3b3f70276f
commit 30ed48ad1b
17 changed files with 2076 additions and 20 deletions

View File

@@ -65,8 +65,10 @@ impl PodmanClient {
fn podman_command(&self) -> Command {
let mut cmd = Command::new("podman");
if self.rootless {
// Run as the specified user
cmd.env("HOME", format!("/home/{}", self.user));
// Use actual HOME environment variable instead of hardcoded /home
if let Ok(home) = std::env::var("HOME") {
cmd.env("HOME", home);
}
}
cmd
}
@@ -74,7 +76,10 @@ impl PodmanClient {
fn podman_async(&self) -> TokioCommand {
let mut cmd = TokioCommand::new("podman");
if self.rootless {
cmd.env("HOME", format!("/home/{}", self.user));
// Use actual HOME environment variable instead of hardcoded /home
if let Ok(home) = std::env::var("HOME") {
cmd.env("HOME", home);
}
}
cmd
}