1- # =============================================================================
2- # jdeathe/centos-ssh-apache-php-fcgi
3- #
4- # CentOS-6, Apache 2.2, PHP 5.3, PHP Memcached 1.0, PHP APC 3.1.
5- #
6- # =============================================================================
7- FROM jdeathe/centos-ssh-apache-php:1.11.1
1+ FROM jdeathe/centos-ssh-apache-php:1.12.0
82
9- # -----------------------------------------------------------------------------
10- # FastCGI support
11- # -----------------------------------------------------------------------------
3+ ARG RELEASE_VERSION="1.11.1"
4+
5+ # ------------------------------------------------------------------------------
6+ # - Base install of required packages
7+ # ------------------------------------------------------------------------------
128RUN rpm --rebuilddb \
139 && yum -y erase \
1410 php-5.3.3-49.el6 \
@@ -23,38 +19,52 @@ RUN rpm --rebuilddb \
2319 && rm -rf /var/cache/yum/* \
2420 && yum clean all
2521
26- # -----------------------------------------------------------------------------
22+ # ------------------------------------------------------------------------------
2723# Copy files into place
28- # -----------------------------------------------------------------------------
29- ADD src/opt/scmi \
30- /opt/scmi/
31- ADD src/etc/systemd/system \
32- /etc/systemd/system/
24+ # ------------------------------------------------------------------------------
25+ ADD src /
3326
34- # -----------------------------------------------------------------------------
27+ # ------------------------------------------------------------------------------
28+ # Provisioning
29+ # - Relocate default fcgid configuration to ensure correct loading order
30+ # - Replace placeholders with values in systemd service unit template
31+ # - Set permissions
32+ # ------------------------------------------------------------------------------
33+ RUN cat \
34+ /etc/httpd/conf.d/fcgid.conf \
35+ > /etc/httpd/conf.d/00-fcgid.conf \
36+ && truncate -s 0 \
37+ /etc/httpd/conf.d/fcgid.conf \
38+ && sed -i \
39+ -e "s~{{RELEASE_VERSION}}~${RELEASE_VERSION}~g" \
40+ /etc/systemd/system/centos-ssh-apache-php-fcgi@.service \
41+ && chmod 700 \
42+ /usr/{bin/healthcheck,sbin/httpd-{bootstrap,wrapper}}
43+
44+ # ------------------------------------------------------------------------------
3545# Package installation
36- # -----------------------------------------------------------------------------
46+ # ------------------------------------------------------------------------------
3747RUN sed -i \
38- -e 's~^description =.*$~description = "This CentOS / Apache / PHP-CGI (FastCGI) service is running in a container."~' \
39- ${PACKAGE_PATH}/etc/views/index.ini
48+ -e 's~^description =.*$~description = "This CentOS / Apache / PHP-CGI (FastCGI) service is running in a container."~' \
49+ ${PACKAGE_PATH}/etc/views/index.ini \
50+ && sed -r -i \
51+ -e 's~^(source /etc/httpd-bootstrap\. conf)~#\1 ~' \
52+ ${PACKAGE_PATH}/bin/php-wrapper
4053
41- # -----------------------------------------------------------------------------
54+ # ------------------------------------------------------------------------------
4255# Set default environment variables used to configure the service container
43- # -----------------------------------------------------------------------------
56+ # ------------------------------------------------------------------------------
4457ENV APACHE_MPM="worker"
4558
46- # -----------------------------------------------------------------------------
59+ # ------------------------------------------------------------------------------
4760# Set image metadata
48- # -----------------------------------------------------------------------------
49- ARG RELEASE_VERSION="1.11.1"
61+ # ------------------------------------------------------------------------------
5062LABEL \
5163 maintainer="James Deathe <james.deathe@gmail.com>" \
5264 install="docker run \
5365--rm \
5466--privileged \
5567--volume /:/media/root \
56- --env BASH_ENV="" \
57- --env ENV="" \
5868jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
5969/usr/sbin/scmi install \
6070--chroot=/media/root \
@@ -64,8 +74,6 @@ jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
6474--rm \
6575--privileged \
6676--volume /:/media/root \
67- --env BASH_ENV="" \
68- --env ENV="" \
6977jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
7078/usr/sbin/scmi uninstall \
7179--chroot=/media/root \
@@ -79,4 +87,4 @@ jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
7987 org.deathe.url="https://github.com/jdeathe/centos-ssh-apache-php-fcgi" \
8088 org.deathe.description="CentOS-6 6.10 x86_64 - Apache 2.2, PHP-CGI 5.3 (FastCGI), PHP memcached 1.0, PHP APC 3.1."
8189
82- CMD ["/usr/sbin/httpd-startup" , "/usr/ bin/supervisord" , "--configuration=/etc/supervisord.conf" ]
90+ CMD ["/usr/bin/supervisord" , "--configuration=/etc/supervisord.conf" ]
0 commit comments