title: Container stop because of: "httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: No such file or directory", why?
body: <p>I am working on a Docker version of PyroCMS. This is the <a href="https://github.com/reypm/docker-pyrocms" rel="nofollow noreferrer">repository</a> I have with the latest files. As you can see I have a stack running: CentOS 7 (with Supervisord), MySQL, Apache and PHP. This is the <code>docker-compose.yml</code> file:</p>
  
  <pre><code>version: '2.1'
  services:
      httpd:
          build: docker/httpd
          ports:
              - "8080:80"
          volumes_from:
              - php-fpm
      php-fpm:
          build:
              context: docker/php-fpm
              args:
                  INSTALL_XDEBUG: "false"
                  INSTALL_MONGO: "false"
                  INSTALL_REDIS: "false"
                  INSTALL_HTTP_REQUEST: "false"
                  INSTALL_UPLOAD_PROGRESS: "false"
                  INSTALL_XATTR: "false"
          depends_on:
              db:
                  condition: service_healthy
      db:
          image: mysql
          healthcheck:
              test: "exit 0"
          environment:
              MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
              MYSQL_DATABASE: ${MYSQL_DATABASE}
              MYSQL_USER: ${MYSQL_USER}
              MYSQL_PASSWORD: ${MYSQL_PASSWORD}
  </code></pre>
  
  <p>This is the <code>Dockerfile</code> for the <code>httpd</code> image:</p>
  
  <pre><code>FROM reynierpm/centos7-supervisor
  RUN yum install -y httpd nano &amp;&amp; \
      yum clean all &amp;&amp; rm -rf /tmp/yum*
  RUN rm -f /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/* /etc/httpd/conf.modules.d/*
  COPY container-files /
  EXPOSE 80
  </code></pre>
  
  <p>I am having a problem since the <code>httpd</code> container exit with status 1 and seeing the logs I got the following:</p>
  
  <pre><code>httpd_1  | httpd: Could not open configuration file /etc/httpd/conf/httpd.conf: No such file or directory
  </code></pre>
  
  <p>At first glance you will say: </p>
  
  <p><em>you're deleting the files!!! in this line <code>RUN rm -f /etc/httpd/conf/httpd.conf /etc/httpd/conf.d/* /etc/httpd/conf.modules.d/*</code></em> </p>
  
  <p>And you're right but if you take a closer look you'll see I am copying it back (because I am running a minimal Apache configuration) in the line:</p>
  
  <pre><code>COPY container-files /
  </code></pre>
  
  <p>I am not sure why the file can't be found and why the container is stopping and exiting, can any take a look to this and let me know where I am making a mistake if there is one? </p>