Where is the service container compiled to? Where is the service container compiled to in Drupal 8, in the database or in a file?
As @mradcliffe described in a commment, the normal Symfony way to compile and cache the service container is a single php file. Drupal used this until Sep. 2015. If you have an older installation, you still find the compiled container in php/**/, because it was never deleted by newer versions.

For better performance Drupal has changed this and stores it now in database in the table cache_container. The change record and how to take a look inside the container to debug it:

Change record: The service container definition is now stored in the database by default