Start Xvfb wrapper in background and wait for the process to complete.
Because wait exits immediately when a signal for which a trap has been
set, and the signal handler is executed directly after that, we need to
wait again for the background processes to actually finish before exiting.
The signal handler catches INT and TERM and forwards them to the node
process.
The return value from the first wait is stored and sent as exit value.
Move package installation to top of file to enable layer caching
in Docker. Use multi stage builds to reduce final image size.
Ignore everything but essential files when creating Docker build
context.