Prevent docker containers from running longer than 2 seconds.

What do you think about pulling this code out to its own module and testing it separately?