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

Commit c7ad479

Browse files
authored
Merge pull request #168 from jdeathe/issue/166
CLOSES #166: Updates image source to 1.12.0.
2 parents a157424 + 4c0d55c commit c7ad479

File tree

15 files changed

+3657
-594
lines changed

15 files changed

+3657
-594
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
.env
2+
.env.example
13
.git
24
.gitignore
35
dist
6+
images
47
test
8+
docker-compose.yml
59
LICENSE
610
README-short.txt
711
*.md

.env.example

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
APACHE_CONTENT_ROOT=/var/www/app
2+
APACHE_CUSTOM_LOG_FORMAT=combined
3+
APACHE_CUSTOM_LOG_LOCATION=var/log/apache_access_log
4+
APACHE_ERROR_LOG_LOCATION=var/log/apache_error_log
5+
APACHE_ERROR_LOG_LEVEL=warn
6+
APACHE_EXTENDED_STATUS_ENABLED=false
7+
APACHE_HEADER_X_SERVICE_UID={{HOSTNAME}}
8+
APACHE_LOAD_MODULES=
9+
APACHE_MOD_SSL_ENABLED=false
10+
APACHE_MPM=worker
11+
APACHE_OPERATING_MODE=production
12+
APACHE_PUBLIC_DIRECTORY=public_html
13+
APACHE_RUN_GROUP=app-www
14+
APACHE_RUN_USER=app-www
15+
APACHE_SERVER_ALIAS=
16+
APACHE_SERVER_NAME=
17+
APACHE_SSL_CERTIFICATE=
18+
APACHE_SSL_CIPHER_SUITE=ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
19+
APACHE_SSL_PROTOCOL=All -SSLv2 -SSLv3
20+
APACHE_SYSTEM_USER=app
21+
PACKAGE_PATH=/opt/app
22+
PHP_OPTIONS_DATE_TIMEZONE=UTC
23+
PHP_OPTIONS_SESSION_NAME=PHPSESSID
24+
PHP_OPTIONS_SESSION_SAVE_HANDLER=files
25+
PHP_OPTIONS_SESSION_SAVE_PATH=var/session

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Summary of release changes for Version 1.
66

77
CentOS-6 6.10 x86_64, Apache 2.2, PHP-CGI 5.3 (FastCGI), PHP memcached 1.0, PHP APC 3.1.
88

9+
### 1.12.0 - Unreleased
10+
11+
- Updates image source to [1.12.0](https://github.com/jdeathe/centos-ssh-apache-php/releases/tag/1.12.0).
12+
- Adds patched version of `httpd-wrapper` to fix setting user ownership.
13+
914
### 1.11.1 - 2018-12-08
1015

1116
- Updates image source to [1.11.1](https://github.com/jdeathe/centos-ssh-apache-php/releases/tag/1.11.1).

Dockerfile

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
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+
# ------------------------------------------------------------------------------
128
RUN 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+
# ------------------------------------------------------------------------------
3747
RUN 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+
# ------------------------------------------------------------------------------
4457
ENV APACHE_MPM="worker"
4558

46-
# -----------------------------------------------------------------------------
59+
# ------------------------------------------------------------------------------
4760
# Set image metadata
48-
# -----------------------------------------------------------------------------
49-
ARG RELEASE_VERSION="1.11.1"
61+
# ------------------------------------------------------------------------------
5062
LABEL \
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="" \
5868
jdeathe/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="" \
6977
jdeathe/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

Comments
 (0)