Use the global $kernel variable to retrieve the container