44# CentOS-6, Apache 2.2, PHP 5.3, PHP memcached 1.0, PHP APC 3.1, Composer
55#
66# =============================================================================
7- FROM jdeathe/centos-ssh-apache-php
7+ FROM jdeathe/centos-ssh-apache-php:centos-6
88
99MAINTAINER James Deathe <james.deathe@gmail.com>
1010
@@ -17,11 +17,6 @@ RUN yum --setopt=tsflags=nodocs -y install \
1717 && rm -rf /var/cache/yum/* \
1818 && yum clean all
1919
20- # -----------------------------------------------------------------------------
21- # Add a "Message of the Day" to help identify container if logging in via SSH
22- # -----------------------------------------------------------------------------
23- RUN echo '[ CentOS-6 / Apache / PHP (FastCGI) ]' > /etc/motd
24-
2520# -----------------------------------------------------------------------------
2621# Apache mime_magic module should be disabled with FastCGI
2722# -----------------------------------------------------------------------------
@@ -46,9 +41,9 @@ RUN sed -i \
4641# -----------------------------------------------------------------------------
4742# Disable mod_php
4843# -----------------------------------------------------------------------------
49- RUN mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.off
50- RUN touch /etc/httpd/conf.d/php.conf
51- RUN chmod 444 /etc/httpd/conf.d/php.conf
44+ RUN mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.off \
45+ && touch /etc/httpd/conf.d/php.conf \
46+ && chmod 444 /etc/httpd/conf.d/php.conf
5247
5348# -----------------------------------------------------------------------------
5449# Add the PHP Wrapper script
@@ -57,29 +52,20 @@ RUN mkdir -p /var/www/app/bin
5752ADD var/www/app/bin/php-wrapper /var/www/app/bin/
5853
5954# -----------------------------------------------------------------------------
60- # Replace the PHP Standard bootstrap
61- # -----------------------------------------------------------------------------
62- ADD etc/services-config/httpd/apache-bootstrap.conf /etc/services-config/httpd/
63- RUN ln -sf /etc/services-config/httpd/apache-bootstrap.conf /etc/apache-bootstrap.conf
64-
65- ADD etc/apache-bootstrap /etc/
66- RUN chmod +x /etc/apache-bootstrap
67-
68- # -----------------------------------------------------------------------------
69- # Set permissions (app:app-www === 501:502)
55+ # Set permissions & add to the template directory
7056# -----------------------------------------------------------------------------
71- RUN chmod -R 750 /var/www/app/bin
72-
73- # -----------------------------------------------------------------------------
74- # Add to the template directory
75- # -----------------------------------------------------------------------------
76- RUN cp -rpf /var/www/app/bin /var/www/.app-skel/bin
57+ RUN chmod -R 750 /var/www/app/bin \
58+ && cp -rpf /var/www/app/bin /var/www/.app-skel/bin
7759
7860# -----------------------------------------------------------------------------
7961# Copy files into place
8062# -----------------------------------------------------------------------------
63+ ADD etc/apache-bootstrap /etc/
64+ ADD etc/services-config/httpd/apache-bootstrap.conf /etc/services-config/httpd/
8165ADD etc/services-config/httpd/conf.d/fcgid.conf /etc/services-config/httpd/conf.d/
82- RUN ln -sf /etc/services-config/httpd/conf.d/fcgid.conf /etc/httpd/conf.d/fcgid.conf
66+ RUN ln -sf /etc/services-config/httpd/apache-bootstrap.conf /etc/apache-bootstrap.conf \
67+ && ln -sf /etc/services-config/httpd/conf.d/fcgid.conf /etc/httpd/conf.d/fcgid.conf \
68+ && chmod +x /etc/apache-bootstrap
8369
8470EXPOSE 80 8443 443
8571
0 commit comments