mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-05-30 06:39:31 +08:00
11 lines
16 KiB
JavaScript
11 lines
16 KiB
JavaScript
import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.CSeR4K32.js";const k=JSON.parse('{"title":"Script for One-Click Installation of Certain Containers using Docker","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"en/guide/docker/docker_custom.md","filePath":"en/guide/docker/docker_custom.md","lastUpdated":1749312947000}'),n={name:"en/guide/docker/docker_custom.md"};function o(l,s,h,p,r,c){return a(),e("div",null,s[0]||(s[0]=[t(`<h1 id="script-for-one-click-installation-of-certain-containers-using-docker" tabindex="-1">Script for One-Click Installation of Certain Containers using Docker <a class="header-anchor" href="#script-for-one-click-installation-of-certain-containers-using-docker" aria-label="Permalink to "Script for One-Click Installation of Certain Containers using Docker""></a></h1><p>Each container has specific configuration requirements; please refer to them individually.</p><p>If the configured memory is not enough, then it's okay to make up for it with the virtual memory <a href="https://virt.spiritlhl.net/en_US/guide/docker_install.html#setting-up-virtual-memory" target="_blank" rel="noreferrer">here</a>.</p><p>Note that the following scripts must be pre-installed using the environment installation scripts in this set of tutorials before using them</p><h2 id="one-click-setup-of-firefox-browser-container" tabindex="-1">One-Click Setup of Firefox Browser Container <a class="header-anchor" href="#one-click-setup-of-firefox-browser-container" aria-label="Permalink to "One-Click Setup of Firefox Browser Container""></a></h2><ul><li>Crash recovery on startup has been configured.</li><li>Chinese fonts have been integrated into the container.</li><li>Built-in web validation with the option to set a custom password.</li><li>Maximum memory usage for the container is customizable.</li><li>Choice to enable VNC port, disabled by default.</li><li>No need to consider support for nested virtualization or server architecture.</li><li>Audio mapping is not supported; sound transmission is unavailable on both the web and VNC.</li></ul><p><strong>The host machine should have at least 1 core, 1GB RAM, and 5GB disk space. The created container will occupy a minimum of 1GB disk space.</strong></p><p><strong>Setup:</strong></p><p>After setup, the default password is <code>oneclick</code>.</p><p>The default web port is <code>3003</code>. Once the setup is complete, simply open <code>HOST_IPV4:PORT</code> in your browser.</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onefirefox.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onefirefox.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onefirefox.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onefirefox.sh</span></span></code></pre></div><p><strong>Deletion</strong></p><p>Modify the following port number <code>3003</code> to your actual port number, and then execute the command to delete the container, configuration file, and corresponding image</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">PORT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"3003"</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> stop</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> firefox_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> firefox_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -rf</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /usr/local/bin/firefox_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rmi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> jlesage/firefox</span></span></code></pre></div><h2 id="one-click-setup-of-chrome-browser-container" tabindex="-1">One-Click Setup of Chrome Browser Container <a class="header-anchor" href="#one-click-setup-of-chrome-browser-container" aria-label="Permalink to "One-Click Setup of Chrome Browser Container""></a></h2><ul><li>Crashing self-start has been set</li><li>Web checksums and passwords can be set.</li><li>Customizable maximum container memory footprint</li><li>No need to consider whether to support nested virtualization and server architecture.</li><li>Supports sound mapping</li></ul><p><strong>Host requires at least 1 core, 2G RAM, and 10G hard disk, and the size of the container to be opened will take up a minimum of 1G hard disk</strong></p><p><strong>It is better to hang the execution in the screen during the first installation, to avoid long running SSH connection disconnection</strong></p><p><strong>Opening</strong></p><p>If no custom username is set, the default username after opening is <code>oneclick</code>.</p><p>If no custom password is set, the default password after opening is <code>oneclick</code>.</p><p>The default http port is <code>3004</code>, open <code>http://IPV4:3004</code> after opening.</p><p>The default https port is <code>3005</code>, open <code>https://IPV4:3005</code> after opening.</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onechromium.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onechromium.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onechromium.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> onechromium.sh</span></span></code></pre></div><p><strong>Delete</strong></p><p>Change the following port number <code>3004</code> to your actual http port number, then execute the command enter twice to delete the container, configuration file, and corresponding image</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">PORT</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"3004"</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> stop</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chromium_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chromium_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -rf</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /usr/local/bin/config_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -rf</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> /usr/local/bin/password_</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\${PORT}</span></span>
|
||
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rmi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lscr.io/linuxserver/chromium</span></span></code></pre></div><h2 id="one-click-setup-of-desktop-container" tabindex="-1">One-Click Setup of Desktop Container <a class="header-anchor" href="#one-click-setup-of-desktop-container" aria-label="Permalink to "One-Click Setup of Desktop Container""></a></h2><ul><li>Crashes automatically restart have been configured.</li><li>Chinese fonts are included in the setup.</li><li>Built-in web validation with the ability to set your own username and password.</li><li>Customizable maximum memory usage for the container.</li><li>No need to consider nested virtualization support and server architecture.</li><li>Sound mapping is supported, and sound can be transmitted via the web interface.</li></ul><p>A complete Linux desktop on which you can use a browser</p><p><strong>The host system requires at least 1 core, 2 GB of RAM, and 5 GB of hard disk space. The created container will occupy a minimum of 3.2 GB of hard disk space.</strong></p><p><strong>Setup Instructions:</strong></p><p>After setup, the default username is <code>onew</code> and the password is <code>oneclick</code>. The default maximum memory usage is 2 GB.</p><p>The default web port for HTTP protocol is <code>3004</code>, and for HTTPS protocol is <code>3005</code>. After setup, open the corresponding protocol with <code>localhost's IPV4:port</code> in your web browser.</p><p>Run the following command to download and execute the setup script:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>curl -L https://raw.githubusercontent.com/oneclickvirt/docker/main/scripts/onewebtop.sh -o onewebtop.sh && chmod +x onewebtop.sh && bash onewebtop.sh</span></span></code></pre></div><p><strong>Deletion</strong></p><p>Command:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ps</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -a</span></span></code></pre></div><p>Query for containers with a prefix of 'webtop' in their names, and record the IDs of these containers.</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rm</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -f</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> container_ID</span></span></code></pre></div><p>To remove the corresponding image, you can use the following command after deleting all associated containers:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">docker</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> rmi</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lscr.io/linuxserver/webtop</span></span></code></pre></div><h2 id="one-click-installation-of-guacamole" tabindex="-1">One-Click Installation of Guacamole <a class="header-anchor" href="#one-click-installation-of-guacamole" aria-label="Permalink to "One-Click Installation of Guacamole""></a></h2><p>A web-based tool for controlling servers using protocols like SSH or RDP.</p><p>Website: <code>http://your_IPV4_address:80/guacamole</code></p><p>Default Username: <code>guacadmin</code></p><p>Default Password: <code>guacadmin</code></p><p>After installation, remember to change the password upon login.</p><p><strong>The host machine should have at least 1 core, 2GB RAM, and 10GB of disk space; otherwise, launching might lead to host machine freezing!</strong></p><p>Command:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -L</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://raw.githubusercontent.com/oneclickvirt/docker/main/extra_scripts/guacamole.sh</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -o</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> guacamole.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">chmod</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> +x</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> guacamole.sh</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> && </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bash</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> guacamole.sh</span></span></code></pre></div>`,52)]))}const u=i(n,[["render",o]]);export{k as __pageData,u as default};
|