WebVM Discord server Issues This repository hosts the source code for…
- User
User: WebVM Discord server Issues
This repository hosts the source code for https://webvm.io, a Linux virtual machine that runs in your browser.
Try out the new Alpine / Xorg / i3 graphical environment: https://webvm.io/alpine.html
WebVM is a server-less virtual environment running fully client-side in HTML5/WebAssembly. It's designed to be Linux ABI-compatible. It runs an unmodified Debian distribution including many native development toolchains.
WebVM is powered by the CheerpX virtualization engine, and enables safe, sandboxed client-side execution of x86 binaries on any browser. CheerpX includes an x86-to-WebAssembly JIT compiler, a virtual block-based file system, and a Linux syscall emulator.
Enable networking Modern browsers do not provide APIs to directly use TCP or UDP. WebVM provides networking support by integrating with Tailscale, a VPN network that supports WebSockets as a transport layer.
Open the "Networking" panel from the side-bar Click "Connect to Tailscale" from the panel Log in to Tailscale (create an account if you don't have one) Click "Connect" when prompted by Tailscale If you are unfamiliar with Tailscale or would like additional information see WebVM and Tailscale. Fork, deploy, customize deploy_instructions_gif
Fork the repository. Enable Github pages in settings. Click on Settings. Go to the Pages section. Select Github Actions as the source. If you are using a custom domain, ensure Enforce HTTPS is enabled. Run the workflow. Click on Actions. Accept the prompt. This is required only once to enable Actions for your fork. Click on the workflow named Deploy. Click Run workflow and then once more Run workflow in the menu. After a few seconds a new Deploy workflow will start, click on it to see details. After the workflow completes, which takes a few minutes, it will show the URL below the deploy_to_github_pages job.
You can now customize dockerfiles/debian_mini to suit your needs, or make a new Dockerfile from scratch. Use the Path to Dockerfile workflow parameter to select it.
Local deployment From a local git clone
Download the debian_mini Ext2 image from https://github.com/leaningtech/webvm/releases/ You can also build your own by selecting the "Upload GitHub release" workflow option Place the image in the repository root folder Edit config_github_terminal.js Uncomment the default values for CMD, ARGS, ENV and CWD Replace IMAGE_URL with the URL (absolute or relative) for the Ext2 image. For example "/debian_mini_20230519_5022088024.ext2" Build WebVM using npm, output will be placed in the build directory npm install npm run build Start NGINX, it automatically points to the build directory just created nginx -p . -c nginx.conf Visit and enjoy your local WebVM Example customization: Python3 REPL The Deploy workflow takes into account the CMD specified in the Dockerfile. To build a REPL you can simply apply this patch and deploy.
- Assistant
要在本地或通过 GitHub Pages 部署 WebVM,你可以按照以下步骤进行:
1. 使用 GitHub Pages 部署
-
Fork 仓库:
- 登录 GitHub,访问 WebVM 的 GitHub 仓库,并点击 "Fork" 以创建你自己的仓库副本。
-
启用 GitHub Pages:
- 进入你 fork 的仓库,点击 "Settings"(设置)。
- 在左侧菜单中找到并点击 "Pages"。
- 在 "Build and Deployment" 的 "Source" 中选择 "GitHub Actions" 作为来源。
-
运行部署 Workflow:
- 点击 "Actions" 选项卡以访问 GitHub Actions。
- 可能会有启用 Actions 的提示,接受此提示,这只需要在你的 fork 首次使用时执行。
- 找到名为 "Deploy" 的工作流程,点击进入。
- 点击页面上的 "Run workflow" 按钮,再次点击确认运行。
- 等待几分钟,部署工作流程完成后,将会显示部署的 URL。
2. 本地部署
-