title: Tomcat 9 Manager, Docker, and the inability to get passed the login
body: <p>So I've been having this issue where I cannot get passed the login page of the Tomcat Manager. It seems like others have had this issue too, but none of their solutions have seemed to help me in this case. Here are the files I've changed, and used to help me on this frustrating journey of a seemingly trivial problem. Maybe I just need a fresh pair of eyes. </p>
  
  <p>My problem thus far has been the login will not take my credentials I give them and manager keeps giving me the basic auth login until I cancel and it will send me to the <code>401</code> page. My solution I've found is to remove security from the <code>web.xml</code> in the <code>manager/WEB-INF</code> but that isn't exactly a secure nor good thing to do. Any ideas are appreciated! </p>
  
  <p><strong>tomcat-users.xml</strong>:</p>
  
  <pre><code>&lt;tomcat-users&gt;
  &lt;role rolename="manager-gui"/&gt;
  &lt;role rolename="manager-status"/&gt;
  &lt;role rolename="admin"/&gt;
  &lt;role rolename="admin-gui"/&gt;
  &lt;user username="tomcat" password="tomcat" roles="admin, manager-gui, manager-status, admin-gui"/&gt;
  &lt;/tomcat-users&gt;
  </code></pre>
  
  <p><strong>webapps/manager/META-INF/context.xml</strong>:</p>
  
  <pre><code>&lt;Context antiResourceLocking="false" privileged="true" &gt;
  &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="\d+\.\d+\.\d+\.\d+" /&gt;
  &lt;Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p><strong>conf/{engine}/{host}/manager.xml</strong>:</p>
  
  <pre><code>&lt;Context privileged="true" antiResourceLocking="false"
       docBase="${catalina.home}/webapps/manager"&gt;
  &lt;Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="^.*$" /&gt;
  &lt;/Context&gt;
  </code></pre>
  
  <p>This all runs inside a docker image. When I bash inside all of the needed files are there. Is there some configuration I've missed, something I need to remove? I have tried commenting out the <code>Valve</code> in <code>/manager/META-INF/context.xml</code> but also no luck. Thanks for looking! </p>