That can also be done with Docker. You then just have to make sure that whatever you want to run, is also available in the Docker image.
You can do that by building a custom image that is based on the default n8n image and additionally install whatever else you want. Like in this case Puppeteer.