mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
2 lines
6.3 KiB
JavaScript
2 lines
6.3 KiB
JavaScript
import{_ as e,o as a,c as n,ag as o}from"./chunks/framework.DXGyWiRo.js";const g=JSON.parse('{"title":"Bot Container Management","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/container.md","filePath":"getting-started/container.md","lastUpdated":1774787421000}'),i={name:"getting-started/container.md"};function r(s,t,l,h,c,d){return a(),n("div",null,[...t[0]||(t[0]=[o('<h1 id="bot-container-management" tabindex="-1">Bot Container Management <a class="header-anchor" href="#bot-container-management" aria-label="Permalink to "Bot Container Management""></a></h1><p>Every Bot in Memoh operates within its own isolated container environment. This isolation ensures security, provides a dedicated filesystem, and allows the bot to execute code or commands without affecting other bots or the host system.</p><h2 id="concept-the-isolated-workspace" tabindex="-1">Concept: The Isolated Workspace <a class="header-anchor" href="#concept-the-isolated-workspace" aria-label="Permalink to "Concept: The Isolated Workspace""></a></h2><p>The container acts as the bot's private "computer." Within it, the bot can:</p><ul><li>Store and modify files</li><li>Install software via package managers</li><li>Execute scripts</li><li>Maintain state across multiple sessions</li></ul><hr><h2 id="operations" tabindex="-1">Operations <a class="header-anchor" href="#operations" aria-label="Permalink to "Operations""></a></h2><p>Manage the lifecycle of your bot's environment from the <strong>Container</strong> tab in the Bot Detail page.</p><h3 id="lifecycle-actions" tabindex="-1">Lifecycle Actions <a class="header-anchor" href="#lifecycle-actions" aria-label="Permalink to "Lifecycle Actions""></a></h3><ul><li><strong>Create</strong>: Initialize the container if it doesn't exist (using the configured image). Progress is shown via real-time SSE feedback during image pull and creation.</li><li><strong>Start</strong>: Launch the container. The bot must have a running container to perform many operations like file editing or executing tools.</li><li><strong>Stop</strong>: Gracefully shut down the container to save resources.</li><li><strong>Delete</strong>: Remove the container instance.</li></ul><hr><h2 id="container-information" tabindex="-1">Container Information <a class="header-anchor" href="#container-information" aria-label="Permalink to "Container Information""></a></h2><p>The <strong>Container</strong> tab displays real-time data about the bot's runtime:</p><ul><li><strong>Container ID</strong>: Unique identifier for the instance.</li><li><strong>Status</strong>: Whether it's currently running, stopped, or creating.</li><li><strong>Image</strong>: The Docker/Containerd image used as the base.</li><li><strong>Paths</strong>: Host and container paths for data persistence.</li><li><strong>Tasks</strong>: Number of active background tasks running in the container.</li></ul><hr><h2 id="snapshots" tabindex="-1">Snapshots <a class="header-anchor" href="#snapshots" aria-label="Permalink to "Snapshots""></a></h2><p>Snapshots allow you to capture the current state of the bot's container and restore it later. This is useful for:</p><ul><li>Saving a known good configuration</li><li>Versioning the bot's environment</li><li>Testing complex changes safely</li></ul><h3 id="creating-a-snapshot" tabindex="-1">Creating a Snapshot <a class="header-anchor" href="#creating-a-snapshot" aria-label="Permalink to "Creating a Snapshot""></a></h3><ol><li>Ensure the container is stopped or in a stable state.</li><li>Click <strong>Create Snapshot</strong>.</li><li>Provide a name for the snapshot.</li></ol><h3 id="restoring-a-snapshot" tabindex="-1">Restoring a Snapshot <a class="header-anchor" href="#restoring-a-snapshot" aria-label="Permalink to "Restoring a Snapshot""></a></h3><ul><li>Find the desired snapshot in the list and click <strong>Restore</strong>. This will reset the container to the captured state.</li></ul><h3 id="managing-snapshots" tabindex="-1">Managing Snapshots <a class="header-anchor" href="#managing-snapshots" aria-label="Permalink to "Managing Snapshots""></a></h3><ul><li>View a list of existing snapshots with their creation timestamps and parent relationships.</li><li>Use the <strong>Delete</strong> button next to a snapshot to remove it.</li></ul><hr><h2 id="data-export-and-import" tabindex="-1">Data Export and Import <a class="header-anchor" href="#data-export-and-import" aria-label="Permalink to "Data Export and Import""></a></h2><p>The Container tab supports exporting and importing container data for backup, migration, or sharing purposes.</p><h3 id="export" tabindex="-1">Export <a class="header-anchor" href="#export" aria-label="Permalink to "Export""></a></h3><ol><li>Click <strong>Export Data</strong>.</li><li>The container's filesystem data is packaged into a downloadable archive.</li><li>Save the archive to your local machine.</li></ol><h3 id="import" tabindex="-1">Import <a class="header-anchor" href="#import" aria-label="Permalink to "Import""></a></h3><ol><li>Click <strong>Import Data</strong>.</li><li>Select an archive file from your local machine.</li><li>The archive contents are extracted into the container's filesystem.</li></ol><h3 id="restore" tabindex="-1">Restore <a class="header-anchor" href="#restore" aria-label="Permalink to "Restore""></a></h3><p>The <strong>Restore</strong> operation resets the container's data directory to a clean state. This is useful when the filesystem has become corrupted or you want to start fresh without recreating the container.</p><hr><h2 id="container-versioning" tabindex="-1">Container Versioning <a class="header-anchor" href="#container-versioning" aria-label="Permalink to "Container Versioning""></a></h2><p>Memoh tracks container versions to manage the lifecycle of the bot's runtime environment. Version information includes:</p><ul><li><strong>Current Version</strong>: The active container version.</li><li><strong>Version History</strong>: A log of container version changes over time.</li></ul><p>This helps with auditing and understanding when container configurations were updated.</p>',38)])])}const u=e(i,[["render",r]]);export{g as __pageData,u as default};
|