title: Install MongoDB and Tomcat using Dockerfile
body: <p>I was using the <code>Dockerfile</code> mentioned below to install packages of <code>python</code>, <code>mongodb</code> and <code>tomcaton</code> Centos6. </p>
  
  <pre><code>FROM centos:centos6
  RUN yum install -y centos-release-scl &amp;&amp; \
      yum install python27 &amp;&amp;
      echo -e "[mongodb-org-3.2]\nname=MongoDB Repository\nbaseurl==https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/\ngpgcheck=1\nenabled=1\ngpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc" &gt; /etc/yum.repos.d/mongodb-org.repo &amp;&amp; \
      yum install -y mongodb-org &amp;&amp; \
      yum install -y tomcat6
  CMD ["/bin/bash"]
  </code></pre>
  
  <p>I was getting the error below</p>
  
  <p>Your transaction was saved, rerun it with:</p>
  
  <pre><code>yum load-transaction /tmp/yum_save_tx-2016-12-16-05-51EmkBfY.yumtx
  </code></pre>
  
  <p>The command </p>
  
  <pre><code>/bin/sh -c yum install -y centos-release-scl &amp;&amp;     yum install python27 &amp;&amp;     echo -e "[mongodb-org-3.2]\nname=MongoDB Repository\nbaseurl==https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/\ngpgcheck=1\nenabled=1\ngpgkey=https://www.mongodb.org/static/pgp/server-3.2.asc" &gt; /etc/yum.repos.d/mongodb-org.repo &amp;&amp;     yum install -y mongodb-org &amp;&amp;     yum install -y tomcat6
  </code></pre>
  
  <p><code>returned a non-zero code: 1</code></p>
  
  <p>Not sure what would be the possible problem?</p>