title: Not able to access admin console for an activemq instance running in a docker container
body: <p>I have created dockerfile.</p>
  <pre><code>FROM ubuntu:latest
  
  RUN apt-get update &amp;&amp; apt-get -y upgrade
  RUN apt-get -y install curl
  RUN apt-get -y install default-jre
  
  RUN curl -O http://archive.apache.org/dist/activemq/5.16.0/apache-activemq-5.16.0-bin.tar.gz
  RUN mkdir -p /opt/apache/activemq
  RUN tar xvzf apache-activemq-5.16.0-bin.tar.gz -C /opt/apache/activemq
  
  WORKDIR /opt/apache/activemq/apache-activemq-5.16.0/bin
  VOLUME /opt/apache/activemq/apache-activemq-5.16.0/conf
  
  RUN echo './activemq start &amp;&amp; tail -f /opt/apache/activemq/apache-activemq-5.16.0/data/activemq.log' &gt; start.sh
  
  # Admin interface
  EXPOSE 8161
  # Active MQ's default port (Listen port)
  EXPOSE 61616
  
  CMD [&quot;/bin/bash&quot;, &quot;./start.sh&quot;]
  </code></pre>
  <p>I created a docker container like this</p>
  <pre><code>docker run --name activemq -p 8161:8161 -p 61616:61616 temp-activemq:5.16.0
  </code></pre>
  <p>I tried to run the admin console as follows</p>
  <pre><code>http:://localhost:8161/admin/
  http://&lt;IP of the Container&gt;:8161/admin/
  </code></pre>
  <p>Neither of them works</p>
  <p>Outside of the container, I installed activeMQ and tried to run admin console, it worked. Can anyone please help me with pointers on how can I get this sorted?</p>
  <p>I fixed the above issue with</p>
  <pre><code>docker run --rm -d --network host --name activemq temp-activemq:5.16.0
  </code></pre>
  <p>But, I am still researching why the port forwarding is not working?</p>