title: Installing mod_jk in centos 7 on docker for windows
body: <p>I tried Apache for ubuntu in Docker (Docker for windows) in <a href="https://github.com/Paritosh-Anand/Docker-Httpd-Tomcat" rel="nofollow noreferrer">https://github.com/Paritosh-Anand/Docker-Httpd-Tomcat</a></p>
  
  <p>The Dockerfile  is </p>
  
  <pre><code>FROM ubuntu:latest
  
  MAINTAINER &lt;user&gt;@&lt;domain&gt;.com
  
  RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends apache2 libapache2-mod-jk
  
  ADD apache2.conf /etc/apache2/apache2.conf
  
  ADD 000-default.conf /etc/apache2/sites-enabled/000-default.conf
  
  ADD worker.properties /etc/libapache2-mod-jk/workers.properties
  
  ADD jk.conf /etc/apache2/mods-available/jk.conf
  
  VOLUME ["/var/log/apache2"]
  
  EXPOSE 80 443
  
  CMD ["apachectl", "-k", "start", "-DFOREGROUND"]
  </code></pre>
  
  <p>However, I need to run Apache in CentOs 7, not in ubuntu. So I changed the Dockerfile to </p>
  
  <pre><code>FROM centos:7
  
  MAINTAINER &lt;user&gt;@&lt;domain&gt;.com
  
  RUN yum -y --setopt=tsflags=nodocs update 
  RUN yum -y --setopt=tsflags=nodocs install httpd 
  RUN yum -y --setopt=tsflags=nodocs install mod-jk 
  RUN yum clean all
  
  ADD apache2.conf /etc/apache2/apache2.conf
  
  ADD 000-default.conf /etc/apache2/sites-enabled/000-default.conf
  
  ADD worker.properties /etc/libapache2-mod-jk/workers.properties
  
  ADD jk.conf /etc/apache2/mods-available/jk.conf
  
  VOLUME ["/var/log/apache2"]
  
  EXPOSE 80 443
  
  CMD ["apachectl", "-k", "start", "-DFOREGROUND"]
  </code></pre>
  
  <p>On running, I am getting the error</p>
  
  <pre><code>Step 5/13 : RUN yum -y --setopt=tsflags=nodocs install mod-jk
   ---&gt; Running in a98487a9509c
  Loaded plugins: fastestmirror, ovl
  Loading mirror speeds from cached hostfile
   * base: mirrors.nhanhoa.com
   * extras: mirrors.nhanhoa.com
   * updates: mirror.ehost.vn
  No package mod-jk available.
  Error: Nothing to do
  ERROR: Service 'httpd' failed to build: The command '/bin/sh -c yum -y    --setopt=tsflags=nodocs install mod-jk' returned a non-zero code: 1
  </code></pre>
  
  <p>Is this a problem with mirror? How can I install mod_jk in docker where operating system is CentOs 7?
  My Host operating system is windows 10</p>