Building the following Dockerfile will give you the latest version of my ext/dom HTML5 branch:
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install -y binutils gcc re2c flex bison libxml2-dev libsqlite3-dev vim git autoconf pkg-config make libonig-dev