Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit 793c033

Browse files
committed
Merge branch 'centos-6'
Conflicts: README.md
2 parents 8939261 + 32aab8c commit 793c033

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

Dockerfile

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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

99
MAINTAINER 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
5752
ADD 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/
8165
ADD 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

8470
EXPOSE 80 8443 443
8571

0 commit comments

Comments
 (0)