Vim demo (x86_64)
Example of running Vim (x86_64) on browser using container2wasm.
Source Container Image
FROM alpine:3.18
RUN apk add --no-cache vim
ENTRYPOINT ["vim"]
Terminal
[launch ENTRYPOINT] [launch shell (sh)] [disable networking]
It can take some time to load and start the container.
Example
Running the following in the container will get the contents of the demo page over HTTP.
:!wget -O - https://ktock.github.io/container2wasm-demo/
Note
Container can perform HTTP(S) networking via the HTTP(S) proxy running on the browser. In the container, http_proxy
, https_proxy
, HTTP_PROXY
and HTTPS_PROXY
are pre-configured to the proxy's address (http://192.168.127.253:80
). The proxy (+ networking stack) run on browser, relying on the browser's Fetch API. So out-of-browser proxy service is NOT used. HTTPS connection is terminated at the proxy and relies on Fetch API for re-encryption so the certificate for the proxy is configured as SSL_CERT_FILE=/.wasmenv/proxy.crt
in the container.
The proxy is experimental and has limitations:
- The set of accesible sites is limited by browser (e.g. by CORS mechanism).
- The container and the proxy don't have the control over Forbidden headers and they are controlled by the browser.
Please see also container2wasm repo for the details and other less-restricted networking methods (e.g. WebSocket + out-of-browser networking stack).
Tested on Google Chrome 116.0.5845.187. More info including docs and source code is available from container2wasm repo. This page is served from container2wasm-demo repo as GitHub Pages.