Infra-PerCommit-Puppeteer: Run tests inside the RBE toolchain container.

Today, Infra-PerCommit-Puppeteer runs Webpack-built Puppeteer tests inside a custom Docker container (https://gcr.io/skia-public/puppeteer-tests). This causes small visual diffs with respect to screenshots produced by the Bazel build (Infra-PerCommit-Test-Bazel-RBE).

This CL aims to eliminate said diffs by using the same exact containerized environment for both Infra-PerCommit-Puppeteer and Infra-PerCommit-Test-Bazel-RBE.

Bug: skia:10614
Change-Id: Ibcb6cf940a6070d1d2098fe16932d44b0528e48e
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/396277
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
diff --git a/Makefile b/Makefile
index 057bb10..94eba61 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@
 	go build ./...
 
 # Docker image used to run Puppeteer tests (Webpack build).
-PUPPETEER_TESTS_DOCKER_IMG=gcr.io/skia-public/puppeteer-tests:2021-04-08T03_04_24Z-lovisolo-5773877-dirty
+PUPPETEER_TESTS_DOCKER_IMG=gcr.io/skia-public/rbe-container-skia-infra:2021-04-08T00_09_40Z-lovisolo-2482ab0-clean
 
 # This is invoked from Infra-PerCommit-Puppeteer.
 .PHONY: puppeteer-tests
diff --git a/puppeteer-tests/docker/run-tests.sh b/puppeteer-tests/docker/run-tests.sh
index d6018fb..0d5af37 100755
--- a/puppeteer-tests/docker/run-tests.sh
+++ b/puppeteer-tests/docker/run-tests.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# This script is designed to run inside the puppeteer-tests Docker container.
+# This script is designed to run inside the Skia Infra RBE toolchain container.
 
 ################################################################################
 # Set up script environment.                                                   #
@@ -42,6 +42,18 @@
 trap cleanup EXIT
 
 ################################################################################
+# Prepare the RBE toolchain container to run Webpack-built Puppeteer tests.    #
+################################################################################
+
+# Install Node.js and build-essential, which is needed by some NPM packages.
+curl -fsSL https://deb.nodesource.com/setup_15.x | bash
+apt-get install -y nodejs build-essential
+
+# Input/output directories.
+mkdir -p /tests
+mkdir -p /src
+
+################################################################################
 # Populate /tests with a subset of the buildbot repository that includes all   #
 # Puppeteer tests and their dependencies. This is much faster than copying the #
 # entire repository into the container.                                        #