title: How to access doctrine inside the bundle build method
body: <p>I have a build method like the following, Inside the bundle class.</p>
  <pre><code>public function build(ContainerBuilder $container)
  {
      $em = $container-&gt;get('doctrine')-&gt;getManager();
  }
  </code></pre>
  <p>And I want to access the doctrine to retrieve some data from the database.
  But I get an error <code> You have requested a non-existent service &quot;doctrine&quot;.</code> And I don't know what to do. I appreciate any help.</p>