blog.shukriadams.com

Game devops and other things

VSCode slow in your Codespace? It might be Alpine

The problem

I have a Github Codespace, built on a custom NodeJs 12 Docker container, and it is slow. Well, VSCode in that Codespace is slow. The Codespace VM itself works fine - I can use the command line normally, but the in-browser VSCode instance tied to it is so sluggish, it just doesn't work. Portforwarding doesn't start, extensions don't loaded, even the Git integration in VSCode failed to start, stuck on a "Scanning folder for git repositories…" message.

This was especially frustrating because I couldn't find anything on Github or the internet about general outtages or performance issues with Codespaces workspaces or VSCode.

What's going wrong

It's difficult to be certain, but this ticket hints that older versions of Alpine or packages tied to Alpine, like Git, might not work with newer versions of VScode. In my case, my NodeJS 12 container was built on Alpine 3.12.

The (sort of) solution

I rolled a new base container on Alpine 3.19, recreated my Codespace, and VScode was zippy again. This also meant having to bump up to NodeJS 20. This isn't a long-term solution, as I have legacy apps that are tied to NodeJS 12, but at least I stopped pulling my beard out in frustration. Either I need to figure out how to install non-standard versions of NodeJS on Alpine, or I need to change my container base image to Ubuntu Server, which has always let me install whatever version of NodeJS I want as a dpkg.

Anyway, this post is here on the off chance someone is Googling this issue in frustration - hope it helped you.