I should also note that when I did the above with the v4.2.0 tag, I had to add this command (echo 'gem "webrick"' >> Gemfile) as this is a new dependency that appeared following the 4.2.0 release. The instruction for that here looks like this:
Long answer/explanation: Jekyll’s CI scripts are mainly used in a Github Actions workflow, so they assume the environment setup in .github/workflows/ci.yml. That workflow uses Github’s latest Ubuntu image, which comes with a dizzying array of pre-installed packages. At the moment, the only dependencies seem to be Ruby and Node.js.
Note using apt update and apt-get install node.js will work alone. You just end up with Node 10. For more recent versions you need to add a debian source.
The VS Code container linked above provides a solution for Node inside a container using Node 13. Which is weird as 12 and 14 are the long term supported ones that are most used. So change your URL to 14.
Here is how I install Node 14 on my system, outside a container.