mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
2 lines
4.4 KiB
JavaScript
2 lines
4.4 KiB
JavaScript
import{_ as e,o as a,c as n,ag as o}from"./chunks/framework.ePeAWSvT.js";const g=JSON.parse('{"title":"Bot Container Management","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/container.md","filePath":"getting-started/container.md","lastUpdated":1772359263000}'),i={name:"getting-started/container.md"};function s(r,t,l,h,c,p){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).</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. This will delete the temporary state but preserve the data in persistent volumes.</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>',24)])])}const u=e(i,[["render",s]]);export{g as __pageData,u as default};
|