Files
Memoh/assets/getting-started_container.md.00DekezL.js
T
2026-04-04 13:10:56 +00:00

2 lines
6.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 &quot;Bot Container Management&quot;"></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 &quot;Concept: The Isolated Workspace&quot;"></a></h2><p>The container acts as the bot&#39;s private &quot;computer.&quot; 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 &quot;Operations&quot;"></a></h2><p>Manage the lifecycle of your bot&#39;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 &quot;Lifecycle Actions&quot;"></a></h3><ul><li><strong>Create</strong>: Initialize the container if it doesn&#39;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 &quot;Container Information&quot;"></a></h2><p>The <strong>Container</strong> tab displays real-time data about the bot&#39;s runtime:</p><ul><li><strong>Container ID</strong>: Unique identifier for the instance.</li><li><strong>Status</strong>: Whether it&#39;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 &quot;Snapshots&quot;"></a></h2><p>Snapshots allow you to capture the current state of the bot&#39;s container and restore it later. This is useful for:</p><ul><li>Saving a known good configuration</li><li>Versioning the bot&#39;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 &quot;Creating a Snapshot&quot;"></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 &quot;Restoring a Snapshot&quot;"></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 &quot;Managing Snapshots&quot;"></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 &quot;Data Export and Import&quot;"></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 &quot;Export&quot;"></a></h3><ol><li>Click <strong>Export Data</strong>.</li><li>The container&#39;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 &quot;Import&quot;"></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&#39;s filesystem.</li></ol><h3 id="restore" tabindex="-1">Restore <a class="header-anchor" href="#restore" aria-label="Permalink to &quot;Restore&quot;"></a></h3><p>The <strong>Restore</strong> operation resets the container&#39;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 &quot;Container Versioning&quot;"></a></h2><p>Memoh tracks container versions to manage the lifecycle of the bot&#39;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};