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

Commit c3449c5

Browse files
authored
Merge pull request #128 from jdeathe/issue/127
CLOSES #127: Updates upstream source to release 1.10.1.
2 parents 6ee7ed1 + 87774d0 commit c3449c5

File tree

8 files changed

+441
-52
lines changed

8 files changed

+441
-52
lines changed

CHANGELOG.md

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

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

9+
### 1.10.1 - Unreleased
10+
11+
- Updates image source to [release 1.10.1](https://github.com/jdeathe/centos-ssh-apache-php/releases/tag/1.10.1).
12+
913
### 1.10.0 - 2017-07-16
1014

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

Dockerfile

Lines changed: 1 addition & 1 deletion
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.
55
#
66
# =============================================================================
7-
FROM jdeathe/centos-ssh-apache-php:1.10.0
7+
FROM jdeathe/centos-ssh-apache-php:1.10.1
88

99
# -----------------------------------------------------------------------------
1010
# FastCGI support

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ $ sudo -E atomic uninstall \
217217

218218
#### Environment Variables
219219

220+
There are environmental variables available which allows the operator to customise the running container.
221+
222+
##### APACHE_AUTOSTART_HTTPD_BOOTSTRAP & APACHE_AUTOSTART_HTTPD_WRAPPER
223+
224+
It may be desirable to prevent the startup of the httpd-bootstrap and/or httpd-wrapper scripts. For example, when using an image built from this Dockerfile as the source for another Dockerfile you could disable services from startup by setting `APACHE_AUTOSTART_HTTPD_WRAPPER` to `false`. The benefit of this is to reduce the number of running processes in the final container. Another use for this would be to make use of the packages installed in the image such as `ab`, `curl`, `elinks`, `php-cli` etc.
225+
220226
##### APACHE_SERVER_NAME & APACHE_SERVER_ALIAS
221227

222228
The `APACHE_SERVER_NAME` and `APACHE_SERVER_ALIAS` environmental variables are used to set the VirtualHost `ServerName` and `ServerAlias` values respectively. If the value contains the placeholder `{{HOSTNAME}}` it will be replaced with the system `hostname` value; by default this is the container id but the hostname can be modified using the `--hostname` docker create|run parameter.
@@ -425,3 +431,14 @@ To set the timezone for the UK and account for British Summer Time you would use
425431
--env "PHP_OPTIONS_DATE_TIMEZONE=Europe/London" \
426432
...
427433
```
434+
435+
##### PHP_OPTIONS_SESSION_SAVE_HANDLER & PHP_OPTIONS_SESSION_SAVE_PATH
436+
437+
Using `PHP_OPTIONS_SESSION_SAVE_HANDLER` and `PHP_OPTIONS_SESSION_SAVE_PATH` together it's possible to configure PHP to use an alternative `session.save_handler` and `session.save_path`. For example if you have a Memcached server running on the host `memcached-server` on the default port `11211` the following configuration will allow session data to be stored in Memcached, allowing session data to be shared between multiple PHP containers.
438+
439+
```
440+
...
441+
--env "PHP_OPTIONS_SESSION_SAVE_HANDLER=memcached" \
442+
--env "PHP_OPTIONS_SESSION_SAVE_PATH=memcached-server:11211" \
443+
...
444+
```

default.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
define DOCKER_CONTAINER_PARAMETERS
44
--name $(DOCKER_NAME) \
55
--restart $(DOCKER_RESTART_POLICY) \
6+
--env "APACHE_AUTOSTART_HTTPD_BOOTSTRAP=$(APACHE_AUTOSTART_HTTPD_BOOTSTRAP)" \
7+
--env "APACHE_AUTOSTART_HTTPD_WRAPPER=$(APACHE_AUTOSTART_HTTPD_WRAPPER)" \
68
--env "APACHE_CONTENT_ROOT=$(APACHE_CONTENT_ROOT)" \
79
--env "APACHE_CUSTOM_LOG_FORMAT=$(APACHE_CUSTOM_LOG_FORMAT)" \
810
--env "APACHE_CUSTOM_LOG_LOCATION=$(APACHE_CUSTOM_LOG_LOCATION)" \
@@ -23,7 +25,9 @@ define DOCKER_CONTAINER_PARAMETERS
2325
--env "APACHE_SSL_CIPHER_SUITE=$(APACHE_SSL_CIPHER_SUITE)" \
2426
--env "APACHE_SSL_PROTOCOL=$(APACHE_SSL_PROTOCOL)" \
2527
--env "APACHE_SYSTEM_USER=$(APACHE_SYSTEM_USER)" \
26-
--env "PHP_OPTIONS_DATE_TIMEZONE=$(PHP_OPTIONS_DATE_TIMEZONE)"
28+
--env "PHP_OPTIONS_DATE_TIMEZONE=$(PHP_OPTIONS_DATE_TIMEZONE)" \
29+
--env "PHP_OPTIONS_SESSION_SAVE_HANDLER=$(PHP_OPTIONS_SESSION_SAVE_HANDLER)" \
30+
--env "PHP_OPTIONS_SESSION_SAVE_PATH=$(PHP_OPTIONS_SESSION_SAVE_PATH)"
2731
endef
2832

2933
DOCKER_PUBLISH := $(shell \

environment.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ SSH_USER_PASSWORD_HASHED ?= false
4949
SSH_USER_SHELL ?= /bin/bash
5050
SSH_USER_ID ?= 500:500
5151
# ------------------------------------------------------------------------------
52+
APACHE_AUTOSTART_HTTPD_BOOTSTRAP ?= true
53+
APACHE_AUTOSTART_HTTPD_WRAPPER ?= true
5254
APACHE_CONTENT_ROOT ?= /var/www/app
5355
APACHE_CUSTOM_LOG_FORMAT ?= combined
5456
APACHE_CUSTOM_LOG_LOCATION ?= var/log/apache_access_log
@@ -70,3 +72,5 @@ APACHE_SSL_CIPHER_SUITE ?= ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY
7072
APACHE_SSL_PROTOCOL ?= All -SSLv2 -SSLv3
7173
APACHE_SYSTEM_USER ?= app
7274
PHP_OPTIONS_DATE_TIMEZONE ?= UTC
75+
PHP_OPTIONS_SESSION_SAVE_HANDLER ?= files
76+
PHP_OPTIONS_SESSION_SAVE_PATH ?= /var/lib/php/session

src/etc/systemd/system/centos-ssh-apache-php-fcgi@.service

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Environment="DOCKER_IMAGE_TAG=1.10.0"
5656
Environment="DOCKER_PORT_MAP_TCP_80=8080"
5757
Environment="DOCKER_PORT_MAP_TCP_443=9443"
5858
Environment="DOCKER_PORT_MAP_TCP_8443=NULL"
59+
Environment="APACHE_AUTOSTART_HTTPD_BOOTSTRAP=true"
60+
Environment="APACHE_AUTOSTART_HTTPD_WRAPPER=true"
5961
Environment="APACHE_CONTENT_ROOT=/var/www/app"
6062
Environment="APACHE_CUSTOM_LOG_FORMAT=combined"
6163
Environment="APACHE_CUSTOM_LOG_LOCATION=var/log/apache_access_log"
@@ -77,6 +79,8 @@ Environment="APACHE_SSL_CIPHER_SUITE=ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHA
7779
Environment="APACHE_SSL_PROTOCOL=All -SSLv2 -SSLv3"
7880
Environment="APACHE_SYSTEM_USER=app"
7981
Environment="PHP_OPTIONS_DATE_TIMEZONE=UTC"
82+
Environment="PHP_OPTIONS_SESSION_SAVE_HANDLER=files"
83+
Environment="PHP_OPTIONS_SESSION_SAVE_PATH=/var/lib/php/session"
8084

8185
# Initialisation: Load image from local storage if available, otherwise pull.
8286
ExecStartPre=/bin/bash -c \
@@ -106,6 +110,8 @@ ExecStartPre=-/bin/bash -c \
106110
ExecStart=/bin/bash -c \
107111
"exec /usr/bin/docker run \
108112
--name %p.%i \
113+
--env \"APACHE_AUTOSTART_HTTPD_BOOTSTRAP=${APACHE_AUTOSTART_HTTPD_BOOTSTRAP}\" \
114+
--env \"APACHE_AUTOSTART_HTTPD_WRAPPER=${APACHE_AUTOSTART_HTTPD_WRAPPER}\" \
109115
--env \"APACHE_CONTENT_ROOT=${APACHE_CONTENT_ROOT}\" \
110116
--env \"APACHE_CUSTOM_LOG_FORMAT=${APACHE_CUSTOM_LOG_FORMAT}\" \
111117
--env \"APACHE_CUSTOM_LOG_LOCATION=${APACHE_CUSTOM_LOG_LOCATION}\" \
@@ -127,6 +133,8 @@ ExecStart=/bin/bash -c \
127133
--env \"APACHE_SSL_PROTOCOL=${APACHE_SSL_PROTOCOL}\" \
128134
--env \"APACHE_SYSTEM_USER=${APACHE_SYSTEM_USER}\" \
129135
--env \"PHP_OPTIONS_DATE_TIMEZONE=${PHP_OPTIONS_DATE_TIMEZONE}\" \
136+
--env \"PHP_OPTIONS_SESSION_SAVE_HANDLER=${PHP_OPTIONS_SESSION_SAVE_HANDLER}\" \
137+
--env \"PHP_OPTIONS_SESSION_SAVE_PATH=${PHP_OPTIONS_SESSION_SAVE_PATH}\" \
130138
$(if [[ ${DOCKER_PORT_MAP_TCP_80} != NULL ]]; then \
131139
if /usr/bin/grep -qE '^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}:)?[0-9]*$' <<< \"${DOCKER_PORT_MAP_TCP_80}\"; then \
132140
printf -- '--publish %%s%%s:80' \

src/opt/scmi/environment.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# -----------------------------------------------------------------------------
22
# Constants
33
# -----------------------------------------------------------------------------
4-
DOCKER_USER=jdeathe
5-
DOCKER_IMAGE_NAME=centos-ssh-apache-php-fcgi
4+
readonly DOCKER_USER=jdeathe
5+
readonly DOCKER_IMAGE_NAME=centos-ssh-apache-php-fcgi
66

77
# Tag validation patterns
8-
DOCKER_IMAGE_TAG_PATTERN='^(latest|centos-6|((1|centos-6-1)\.[0-9]+\.[0-9]+))$'
9-
DOCKER_IMAGE_RELEASE_TAG_PATTERN='^(1|centos-6-1)\.[0-9]+\.[0-9]+$'
8+
readonly DOCKER_IMAGE_TAG_PATTERN='^(latest|centos-6|((1|centos-6-1)\.[0-9]+\.[0-9]+))$'
9+
readonly DOCKER_IMAGE_RELEASE_TAG_PATTERN='^(1|centos-6-1)\.[0-9]+\.[0-9]+$'
1010

1111
# -----------------------------------------------------------------------------
1212
# Variables
@@ -53,6 +53,8 @@ SSH_USER_PASSWORD="${SSH_USER_PASSWORD:-}"
5353
SSH_USER_PASSWORD_HASHED="${SSH_USER_PASSWORD_HASHED:-false}"
5454
SSH_USER_SHELL="${SSH_USER_SHELL:-/bin/bash}"
5555
# -----------------------------------------------------------------------------
56+
APACHE_AUTOSTART_HTTPD_BOOTSTRAP="${APACHE_AUTOSTART_HTTPD_BOOTSTRAP:-true}"
57+
APACHE_AUTOSTART_HTTPD_WRAPPER="${APACHE_AUTOSTART_HTTPD_WRAPPER:-true}"
5658
APACHE_CONTENT_ROOT="${APACHE_CONTENT_ROOT:-/var/www/app}"
5759
APACHE_CUSTOM_LOG_FORMAT="${APACHE_CUSTOM_LOG_FORMAT:-combined}"
5860
APACHE_CUSTOM_LOG_LOCATION="${APACHE_CUSTOM_LOG_LOCATION:-var/log/apache_access_log}"
@@ -74,3 +76,5 @@ APACHE_SSL_CIPHER_SUITE="${APACHE_SSL_CIPHER_SUITE:-"ECDHE-ECDSA-CHACHA20-POLY13
7476
APACHE_SSL_PROTOCOL="${APACHE_SSL_PROTOCOL:-All -SSLv2 -SSLv3}"
7577
APACHE_SYSTEM_USER="${APACHE_SYSTEM_USER:-app}"
7678
PHP_OPTIONS_DATE_TIMEZONE="${PHP_OPTIONS_DATE_TIMEZONE:-UTC}"
79+
PHP_OPTIONS_SESSION_SAVE_HANDLER="${PHP_OPTIONS_SESSION_SAVE_HANDLER:-files}"
80+
PHP_OPTIONS_SESSION_SAVE_PATH="${PHP_OPTIONS_SESSION_SAVE_PATH:-/var/lib/php/session}"

0 commit comments

Comments
 (0)