
Install X11 dependencies in the container # apt install xorg xpra ssh Install X11 dependencies in the host $ sudo apt install xpra Run VSCode – OSS version from the host (get IP address of container from lxc ls) I used a combination of the information available here and here as a guide.

This is probably the most difficult part as we’ll need to present the running program on the local host. # dpkg -i /home/vscode/vscode/.build/linux/deb/amd64/deb/code-*.deb Forward X11 socket to display on container host $ yarn global add typescript gulp-yarn gulp-cli $ export NODE_OPTIONS="-max-old-space-size=4096" # apt update & apt install nodejs Install build tools # apt install gcc g++ make Install VSCode dependencies # apt install git make pkg-config fakeroot libx11-dev libxkbfile-dev libsecret-1-dev libgtk-3-0 libasound2 libnotify4 Clone and build VSCode as a local user # adduser vscode # echo "deb-src buster main" | tee -a /etc/apt//nodesource.list # echo "deb buster main" | tee -a /etc/apt//nodesource.list # apt update & apt install yarn Install the latest Node # curl -Ss | apt-key add. # echo "deb stable main" | tee /etc/apt//yarn.list $ lxc exec vscode - /bin/bash Install the latest yarn # apt install gpg curl apt-transport-https lsb-release lxc init images:debian/buster/amd64 vscode I pulled a lot of build instructions from the Azure Pipelines YAML file Microsoft uses to build the binary. Or you can build it locally if you already have yarn installed but I wanted to separate the two as I move to creating my build server in the near future. You can either use LXD or systemd-nspawn to create a container to build it.

The following work served as a great introduction to gulp, a JS build system, and yarn, a JS package manager.

Fortunately, the source code is available under MIT license. Unfortunately, this snap is released under Microsoft’s standard product EULA along with the builds available on their GitHub. VSCode is pretty good multi-platform editor made by Microsoft that’s available as a snap.
