Restart apache on Docker
<p>I am trying to update my .htaccess file on a Docker container.  After updating the file I need to restart Apache.  Whenever I try to restart Apache: with the command <code>service apache2 restart</code> I get the following error:</p>

<blockquote>
  <p>(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
  no listening sockets available, shutting down
  Unable to open logs
  Action 'start' failed.
  The Apache error log may have more information.
     ...fail!</p>
</blockquote>

<p>When I got to the error log it doesn't have any new errors.
This is what my Dockerfile looks like:</p>

<pre><code>    FROM ubuntu:12.04

# Install dependencies
RUN apt-get update -y
RUN apt-get install -y git curl apache2 php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-curl vim

# Install app
RUN rm -rf /var/www/ *
ADD src /var/www

# Configure apache
RUN a2enmod rewrite
RUN chown -R www-data:www-data /var/www
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2

EXPOSE 80

CMD ["/usr/sbin/apache2", "-D",  "FOREGROUND"]
</code></pre>