Debian container on VS Code

Example of https://github.com/ktock/vscode-container-wasm

  1. Open this repo on github.dev : https://github.dev/ktock/vscode-container-wasm-debian-example?vscode-coi=on (if using . shortcut key, you need to add ?vscode-coi=on query manually in the URL)
  2. Install ktock.container-wasm extension.
  3. Run > Run Container On Browser in the command pallete. Then the container will be launched with the Terminal (can take some time to start the container)

Debian Container on browser

Container

This will launch the following debian:sid-slim-based container served from https://ktock.github.io/container2wasm-demo/

FROM debian:sid-slim
RUN apt-get update && apt-get install -y curl

The workspace is visible at /workspace in the container.

Note that this extension doesn't require remote container. This extension downloads the Wasm image converted from the container and runs it in the WebAssembly VM in your browser.

You can customize setting.json if you want to load other containers.

Networking

Running the following in the container will get the contents of the GitHub Pages.

$ curl https://ktock.github.io/container2wasm-demo/

HTTP(S) networking is available in the contaienr with restrictions by the browser (CORS-restricted and no control over Forbidden headers). (see also the project README).

More info about the container

The container is served from container2wasm-demo repo. Please see that repo for more information.

For more info about the extension: https://github.com/ktock/vscode-container-wasm