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

Commit 85d7641

Browse files
authored
Merge pull request #120 from jdeathe/centos-6-develop
Release changes for 1.9.0
2 parents a0bc678 + 72658b6 commit 85d7641

File tree

7 files changed

+310
-72
lines changed

7 files changed

+310
-72
lines changed

CHANGELOG.md

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

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

9+
### 1.9.0 - 2017-02-07
10+
11+
- Updates image source to release 1.9.0.
12+
- Fixes issue with app specific `httpd` configuration requiring the `etc/php.d` directory to exist.
13+
- Adds default Apache modules appropriate for Apache 2.4/2.2 in the bootstrap script for the unlikely case where the values in the environment and configuration file defaults are both unset.
14+
- Updates `README.md` with details of the SCMI install example's prerequisite step of either pulling or loading the image.
15+
- Updates `httpd` and `mod_ssl` packages.
16+
- Fixes noisy certificate generation output in logs during bootstrap when `APACHE_MOD_SSL_ENABLED` is `true`.
17+
- Changes `APACHE_SERVER_ALIAS` to a default empty value for `Makefile`, `scmi` and `systemd` templates which is the existing `Dockerfile` default.
18+
- Changes default `APACHE_SERVER_NAME` to unset and use the container's hostname for the Apache ServerName.
19+
- Fixes `scmi` install/uninstall examples and Dockerfile `LABEL` install/uninstall templates to prevent the `X-Service-UID` header being populated with the hostname of the ephemeral container used to run `scmi`.
20+
- Adds feature to allow both `APACHE_SERVER_NAME` and `APACHE_SERVER_ALIAS` to contain the `{{HOSTNAME}}` placeholder which is replaced on startup with the container's hostname.
21+
- Removes environment variable re-mappings that are no longer in use: `APP_HOME_DIR`, `APACHE_SUEXEC_USER_GROUP`, `DATE_TIMEZONE`, `SERVICE_USER`, `SUEXECUSERGROUP`, `SERVICE_UID`.
22+
- Changes Apache configuration so that `NameVirtualHost` and `Listen` are separated out from `VirtualHost`.
23+
- Adds further information on the use of `watch` to monitor `server-status`.
24+
- Changes the auto-generated self-signed certificate to include hosts from `APACHE_SERVER_NAME` and `APACHE_SERVER_ALIAS` via subjectAltName.
25+
926
### 1.8.1 - 2017-01-29
1027

1128
- Updates image source to release 1.8.2 including required Makefile and environment changes.

Dockerfile

Lines changed: 6 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.8.2
7+
FROM jdeathe/centos-ssh-apache-php:1.9.0
88

99
MAINTAINER James Deathe <james.deathe@gmail.com>
1010

@@ -46,12 +46,14 @@ ENV APACHE_MPM="worker"
4646
# -----------------------------------------------------------------------------
4747
# Set image metadata
4848
# -----------------------------------------------------------------------------
49-
ARG RELEASE_VERSION="1.8.1"
49+
ARG RELEASE_VERSION="1.9.0"
5050
LABEL \
5151
install="docker run \
5252
--rm \
5353
--privileged \
5454
--volume /:/media/root \
55+
--env BASH_ENV="" \
56+
--env ENV="" \
5557
jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
5658
/usr/sbin/scmi install \
5759
--chroot=/media/root \
@@ -61,6 +63,8 @@ jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
6163
--rm \
6264
--privileged \
6365
--volume /:/media/root \
66+
--env BASH_ENV="" \
67+
--env ENV="" \
6468
jdeathe/centos-ssh-apache-php-fcgi:${RELEASE_VERSION} \
6569
/usr/sbin/scmi uninstall \
6670
--chroot=/media/root \

README.md

Lines changed: 32 additions & 18 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.8.1` or `1.8.1` for the [1.8.1](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.9.0` or `1.9.0` for the [1.9.0](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/tree/1.7.0) release tag.
1111

12-
- centos-6, `centos-6-1.8.1`, `1.8.1` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
12+
- `centos-6`, `centos-6-1.9.0`, `1.9.0` [(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

@@ -85,10 +85,12 @@ $ docker run \
8585
--rm \
8686
--privileged \
8787
--volume /:/media/root \
88-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1 \
88+
--env BASH_ENV="" \
89+
--env ENV="" \
90+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0 \
8991
/usr/sbin/scmi install \
9092
--chroot=/media/root \
91-
--tag=1.8.1 \
93+
--tag=1.9.0 \
9294
--name=apache-php.pool-1.1.1
9395
```
9496

@@ -101,10 +103,12 @@ $ docker run \
101103
--rm \
102104
--privileged \
103105
--volume /:/media/root \
104-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1 \
106+
--env BASH_ENV="" \
107+
--env ENV="" \
108+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0 \
105109
/usr/sbin/scmi uninstall \
106110
--chroot=/media/root \
107-
--tag=1.8.1 \
111+
--tag=1.9.0 \
108112
--name=apache-php.pool-1.1.1
109113
```
110114

@@ -117,10 +121,12 @@ $ docker run \
117121
--rm \
118122
--privileged \
119123
--volume /:/media/root \
120-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1 \
124+
--env BASH_ENV="" \
125+
--env ENV="" \
126+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0 \
121127
/usr/sbin/scmi install \
122128
--chroot=/media/root \
123-
--tag=1.8.1 \
129+
--tag=1.9.0 \
124130
--name=apache-php.pool-1.1.1 \
125131
--manager=systemd \
126132
--register \
@@ -142,7 +148,7 @@ To see detailed information about the image run `scmi` with the `--info` option.
142148
$ eval "sudo -E $(
143149
docker inspect \
144150
-f "{{.ContainerConfig.Labels.install}}" \
145-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1
151+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0
146152
) --info"
147153
```
148154

@@ -152,7 +158,7 @@ To perform an installation using the docker name `apache-php.pool-1.2.1` simply
152158
$ eval "sudo -E $(
153159
docker inspect \
154160
-f "{{.ContainerConfig.Labels.install}}" \
155-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1
161+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0
156162
) --name=apache-php.pool-1.2.1"
157163
```
158164

@@ -162,20 +168,26 @@ To uninstall use the *same command* that was used to install but with the `unins
162168
$ eval "sudo -E $(
163169
docker inspect \
164170
-f "{{.ContainerConfig.Labels.uninstall}}" \
165-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1
171+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0
166172
) --name=apache-php.pool-1.2.1"
167173
```
168174

169175
##### SCMI on Atomic Host
170176

171177
With the addition of install/uninstall image labels it is possible to use [Project Atomic's](http://www.projectatomic.io/) `atomic install` command to simplify install/uninstall tasks on [CentOS Atomic](https://wiki.centos.org/SpecialInterestGroup/Atomic) Hosts.
172178

179+
_NOTE:_ A prerequisite of the following examples is that the image has been pulled (or loaded from the release package).
180+
181+
```
182+
$ docker pull jdeathe/centos-ssh-apache-php-fcgi:1.9.0
183+
```
184+
173185
To see detailed information about the image run `scmi` with the `--info` option. To see all available `scmi` options run with the `--help` option.
174186

175187
```
176188
$ sudo -E atomic install \
177189
-n apache-php.pool-1.3.1 \
178-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1 \
190+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0 \
179191
--info
180192
```
181193

@@ -184,14 +196,14 @@ To perform an installation using the docker name `apache-php.pool-1.3.1` simply
184196
```
185197
$ sudo -E atomic install \
186198
-n apache-php.pool-1.3.1 \
187-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1
199+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0
188200
```
189201

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

192204
```
193205
$ sudo -E atomic install \
194-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1 \
206+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0 \
195207
--name apache-php.pool-1.3.1
196208
```
197209

@@ -200,14 +212,16 @@ To uninstall use the *same command* that was used to install but with the `unins
200212
```
201213
$ sudo -E atomic uninstall \
202214
-n apache-php.pool-1.3.1 \
203-
jdeathe/centos-ssh-apache-php-fcgi:1.8.1
215+
jdeathe/centos-ssh-apache-php-fcgi:1.9.0
204216
```
205217

206218
#### Environment Variables
207219

208220
##### APACHE_SERVER_NAME & APACHE_SERVER_ALIAS
209221

210-
The `APACHE_SERVER_NAME` and `APACHE_SERVER_ALIAS` environmental variables are used to set the VirtualHost `ServerName` and `ServerAlias` values respectively. In the following example the running container would respond to the host names `app-1.local` or `app-1`:
222+
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.
223+
224+
In the following example the running container would respond to the host names `app-1.local` or `app-1`.
211225

212226
```
213227
...
@@ -260,13 +274,13 @@ The variable `APACHE_EXTENDED_STATUS_ENABLED` allows you to turn ExtendedStatus
260274
...
261275
```
262276

263-
You can view the output from Apache server-status either using the elinks browser from onboard the container or by using `watch` and `curl` to monitor status over time - the following command shows the server-status updated at a 1 second interval.
277+
You can view the output from Apache server-status either using the elinks browser from onboard the container or by using `watch` and `curl` to monitor status over time. The following command shows the server-status updated at a 1 second interval given an `APACHE_SERVER_NAME` or `APACHE_SERVER_ALIAS` of "app-1.local".
264278

265279
```
266280
$ docker exec -it apache-php.pool-1.1.1 \
267281
env TERM=xterm \
268282
watch -n 1 \
269-
-d "curl -s http://app-1/server-status?auto"
283+
-d "curl -sH 'Host: app-1.local' http://127.0.0.1/server-status?auto"
270284
```
271285

272286
##### APACHE_HEADER_X_SERVICE_UID

environment.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ APACHE_MPM ?= worker
6060
APACHE_PUBLIC_DIRECTORY ?= public_html
6161
APACHE_RUN_GROUP ?= app-www
6262
APACHE_RUN_USER ?= app-www
63-
APACHE_SERVER_ALIAS ?= app-1
64-
APACHE_SERVER_NAME ?= app-1.local
63+
APACHE_SERVER_ALIAS ?=
64+
APACHE_SERVER_NAME ?=
6565
APACHE_SYSTEM_USER ?= app
6666
PHP_OPTIONS_DATE_TIMEZONE ?= UTC

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ 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.8.1"
55+
Environment="DOCKER_IMAGE_TAG=1.9.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"
@@ -70,9 +70,8 @@ Environment="APACHE_OPERATING_MODE=production"
7070
Environment="APACHE_PUBLIC_DIRECTORY=public_html"
7171
Environment="APACHE_RUN_GROUP=app-www"
7272
Environment="APACHE_RUN_USER=app-www"
73-
Environment="APACHE_SERVER_ALIAS=app-1"
74-
Environment="APACHE_SERVER_HOME=/var/www"
75-
Environment="APACHE_SERVER_NAME=app-1.local"
73+
Environment="APACHE_SERVER_ALIAS="
74+
Environment="APACHE_SERVER_NAME="
7675
Environment="APACHE_SYSTEM_USER=app"
7776
Environment="PHP_OPTIONS_DATE_TIMEZONE=UTC"
7877

opt/scmi/environment.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ APACHE_HEADER_X_SERVICE_UID="${APACHE_HEADER_X_SERVICE_UID:-"{{HOSTNAME}}"}"
6060
APACHE_LOAD_MODULES="${APACHE_LOAD_MODULES:-authz_user_module log_config_module expires_module deflate_module headers_module setenvif_module mime_module status_module dir_module alias_module version_module}"
6161
APACHE_OPERATING_MODE="${APACHE_OPERATING_MODE:-production}"
6262
APACHE_MOD_SSL_ENABLED="${APACHE_MOD_SSL_ENABLED:-false}"
63-
APACHE_MPM="${APACHE_MPM:-prefork}"
63+
APACHE_MPM="${APACHE_MPM:-worker}"
6464
APACHE_PUBLIC_DIRECTORY="${APACHE_PUBLIC_DIRECTORY:-public_html}"
6565
APACHE_RUN_GROUP="${APACHE_RUN_GROUP:-app-www}"
6666
APACHE_RUN_USER="${APACHE_RUN_USER:-app-www}"
67-
APACHE_SERVER_ALIAS="${APACHE_SERVER_ALIAS:-app-1}"
68-
APACHE_SERVER_NAME="${APACHE_SERVER_NAME:-app-1.local}"
67+
APACHE_SERVER_ALIAS="${APACHE_SERVER_ALIAS:-}"
68+
APACHE_SERVER_NAME="${APACHE_SERVER_NAME:-}"
6969
APACHE_SYSTEM_USER="${APACHE_SYSTEM_USER:-app}"
7070
PHP_OPTIONS_DATE_TIMEZONE="${PHP_OPTIONS_DATE_TIMEZONE:-UTC}"

0 commit comments

Comments
 (0)