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

Commit 67f761c

Browse files
authored
Merge pull request #129 from jdeathe/centos-6-develop
Release changes for 1.10.1
2 parents 43d2d7c + e58fa10 commit 67f761c

File tree

8 files changed

+459
-70
lines changed

8 files changed

+459
-70
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 - 2017-09-28
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: 2 additions & 2 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.
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
@@ -46,7 +46,7 @@ ENV APACHE_MPM="worker"
4646
# -----------------------------------------------------------------------------
4747
# Set image metadata
4848
# -----------------------------------------------------------------------------
49-
ARG RELEASE_VERSION="1.10.0"
49+
ARG RELEASE_VERSION="1.10.1"
5050
LABEL \
5151
maintainer="James Deathe <james.deathe@gmail.com>" \
5252
install="docker run \

README.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Apache PHP web server, loading only a minimal set of Apache modules by default.
77

88
## Overview & links
99

10-
The latest CentOS-6 based release can be pulled from the centos-6 Docker tag. For a specific release tag the convention is `centos-6-1.10.0` or `1.10.0` for the [1.10.0](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/tree/1.7.0) release tag.
10+
The latest CentOS-6 based release can be pulled from the centos-6 Docker tag. For a specific release tag the convention is `centos-6-1.10.1` or `1.10.1` for the [1.10.1](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/tree/1.7.0) release tag.
1111

12-
- `centos-6`, `centos-6-1.10.0`, `1.10.0` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
12+
- `centos-6`, `centos-6-1.10.1`, `1.10.1` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
1313

1414
This build of [Apache](https://httpd.apache.org/), (httpd CentOS package), uses the [mod_fcgid](https://httpd.apache.org/mod_fcgid/) module to run [PHP](http://php.net/) as a [FastCGI](http://www.fastcgi.com/) process.
1515

@@ -87,10 +87,10 @@ $ docker run \
8787
--volume /:/media/root \
8888
--env BASH_ENV="" \
8989
--env ENV="" \
90-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0 \
90+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1 \
9191
/usr/sbin/scmi install \
9292
--chroot=/media/root \
93-
--tag=1.10.0 \
93+
--tag=1.10.1 \
9494
--name=apache-php.pool-1.1.1
9595
```
9696

@@ -105,10 +105,10 @@ $ docker run \
105105
--volume /:/media/root \
106106
--env BASH_ENV="" \
107107
--env ENV="" \
108-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0 \
108+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1 \
109109
/usr/sbin/scmi uninstall \
110110
--chroot=/media/root \
111-
--tag=1.10.0 \
111+
--tag=1.10.1 \
112112
--name=apache-php.pool-1.1.1
113113
```
114114

@@ -123,10 +123,10 @@ $ docker run \
123123
--volume /:/media/root \
124124
--env BASH_ENV="" \
125125
--env ENV="" \
126-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0 \
126+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1 \
127127
/usr/sbin/scmi install \
128128
--chroot=/media/root \
129-
--tag=1.10.0 \
129+
--tag=1.10.1 \
130130
--name=apache-php.pool-1.1.1 \
131131
--manager=systemd \
132132
--register \
@@ -148,7 +148,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
148148
$ eval "sudo -E $(
149149
docker inspect \
150150
-f "{{.ContainerConfig.Labels.install}}" \
151-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0
151+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1
152152
) --info"
153153
```
154154

@@ -158,7 +158,7 @@ To perform an installation using the docker name `apache-php.pool-1.2.1` simply
158158
$ eval "sudo -E $(
159159
docker inspect \
160160
-f "{{.ContainerConfig.Labels.install}}" \
161-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0
161+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1
162162
) --name=apache-php.pool-1.2.1"
163163
```
164164

@@ -168,7 +168,7 @@ To uninstall use the *same command* that was used to install but with the `unins
168168
$ eval "sudo -E $(
169169
docker inspect \
170170
-f "{{.ContainerConfig.Labels.uninstall}}" \
171-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0
171+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1
172172
) --name=apache-php.pool-1.2.1"
173173
```
174174

@@ -179,15 +179,15 @@ With the addition of install/uninstall image labels it is possible to use [Proje
179179
_NOTE:_ A prerequisite of the following examples is that the image has been pulled (or loaded from the release package).
180180

181181
```
182-
$ docker pull jdeathe/centos-ssh-apache-php-fcgi:1.10.0
182+
$ docker pull jdeathe/centos-ssh-apache-php-fcgi:1.10.1
183183
```
184184

185185
To see detailed information about the image run `scmi` with the `--info` option. To see all available `scmi` options run with the `--help` option.
186186

187187
```
188188
$ sudo -E atomic install \
189189
-n apache-php.pool-1.3.1 \
190-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0 \
190+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1 \
191191
--info
192192
```
193193

@@ -196,14 +196,14 @@ To perform an installation using the docker name `apache-php.pool-1.3.1` simply
196196
```
197197
$ sudo -E atomic install \
198198
-n apache-php.pool-1.3.1 \
199-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0
199+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1
200200
```
201201

202202
Alternatively, you could use the `scmi` options `--name` or `-n` for naming the container.
203203

204204
```
205205
$ sudo -E atomic install \
206-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0 \
206+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1 \
207207
--name apache-php.pool-1.3.1
208208
```
209209

@@ -212,11 +212,17 @@ To uninstall use the *same command* that was used to install but with the `unins
212212
```
213213
$ sudo -E atomic uninstall \
214214
-n apache-php.pool-1.3.1 \
215-
jdeathe/centos-ssh-apache-php-fcgi:1.10.0
215+
jdeathe/centos-ssh-apache-php-fcgi:1.10.1
216216
```
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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ Environment="DOCKER_USER=jdeathe"
5252
Environment="DOCKER_CONTAINER_OPTS="
5353
Environment="DOCKER_IMAGE_PACKAGE_PATH=/var/opt/scmi/packages"
5454
Environment="DOCKER_IMAGE_NAME=centos-ssh-apache-php-fcgi"
55-
Environment="DOCKER_IMAGE_TAG=1.10.0"
55+
Environment="DOCKER_IMAGE_TAG=1.10.1"
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)