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

Commit 8db5132

Browse files
authored
Merge pull request #231 from jdeathe/centos-7-develop
Release changes for 2.2.1
2 parents 095fbc3 + 36ac2a4 commit 8db5132

8 files changed

+43
-29
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
Summary of release changes.
66

7+
### 2.2.1 - 2019-07-28
8+
9+
- Updates php-hello-world to [0.13.0](https://github.com/jdeathe/php-hello-world/releases/tag/0.13.0).
10+
- Updates screenshots in README.
11+
- Adds setting PHP `date.timezone` to `PHP_OPTIONS_DATE_TIMEZONE` into service configuration; removes dependency on app package configuration.
12+
- Adds session PHP settings into service configuration; removes dependency on app package configuration.
13+
714
### 2.2.0 - 2019-07-20
815

916
- Updates source image to [2.6.0](https://github.com/jdeathe/centos-ssh/releases/tag/2.6.0).

Dockerfile

+18-18
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ FROM jdeathe/centos-ssh:2.6.0
33
# Use the form ([{fqdn}-]{package-name}|[{fqdn}-]{provider-name})
44
ARG PACKAGE_NAME="app"
55
ARG PACKAGE_PATH="/opt/${PACKAGE_NAME}"
6-
ARG PACKAGE_RELEASE_VERSION="0.12.0"
7-
ARG RELEASE_VERSION="2.2.0"
6+
ARG PACKAGE_RELEASE_VERSION="0.13.0"
7+
ARG RELEASE_VERSION="2.2.1"
88

99
# ------------------------------------------------------------------------------
1010
# Base install of required packages
@@ -47,9 +47,9 @@ ADD src /
4747
# - Disable Apache default fcgid configuration; replaced with 00-fcgid.conf
4848
# - Custom Apache configuration
4949
# - Disable all Apache modules and enable the minimum
50-
# - Disable SSL
5150
# - Disable the default SSL Virtual Host
52-
# - Global PHP configuration changes
51+
# - Disable SSL
52+
# - Add default PHP configuration overrides to 00-php.ini drop-in.
5353
# - Replace placeholders with values in systemd service unit template
5454
# - Set permissions
5555
# ------------------------------------------------------------------------------
@@ -163,15 +163,19 @@ RUN useradd -r -M -d /var/www/app -s /sbin/nologin app \
163163
/etc/php.ini \
164164
> /etc/php.d/00-php.ini.default \
165165
&& sed -r \
166-
-e 's~^;(user_ini.filename =)$~\1~g' \
167-
-e 's~^;(cgi.fix_pathinfo=1)$~\1~g' \
168-
-e 's~^;(date.timezone =)$~\1 UTC~g' \
169-
-e 's~^(expose_php = )On$~\1Off~g' \
170-
-e 's~^;(realpath_cache_size = ).*$~\14096k~' \
171-
-e 's~^;(realpath_cache_ttl = ).*$~\1600~' \
172-
-e 's~^;?(session.name = ).*$~\1"${PHP_OPTIONS_SESSION_NAME:-PHPSESSID}"~' \
173-
-e 's~^;?(session.save_handler = ).*$~\1"${PHP_OPTIONS_SESSION_SAVE_HANDLER:-files}"~' \
174-
-e 's~^;?(session.save_path = ).*$~\1"${PHP_OPTIONS_SESSION_SAVE_PATH:-/var/lib/php/session}"~' \
166+
-e 's~^;?(cgi.fix_pathinfo( )?=).*$~\1\21~g' \
167+
-e 's~^;?(date.timezone( )?=).*$~\1\2"${PHP_OPTIONS_DATE_TIMEZONE:-UTC}"~g' \
168+
-e 's~^;?(expose_php( )?=).*$~\1\2Off~g' \
169+
-e 's~^;?(realpath_cache_size( )?=).*$~\1\24096k~' \
170+
-e 's~^;?(realpath_cache_ttl( )?=).*$~\1\2600~' \
171+
-e 's~^;?(session.cookie_httponly( )?=).*$~\1\21~' \
172+
-e 's~^;?(session.name( )?=).*$~\1\2"${PHP_OPTIONS_SESSION_NAME:-PHPSESSID}"~' \
173+
-e 's~^;?(session.save_handler( )?=).*$~\1\2"${PHP_OPTIONS_SESSION_SAVE_HANDLER:-files}"~' \
174+
-e 's~^;?(session.save_path( )?=).*$~\1\2"${PHP_OPTIONS_SESSION_SAVE_PATH:-/var/lib/php/session}"~' \
175+
-e 's~^;?(session.sid_bits_per_character( )?=).*$~\1\25~' \
176+
-e 's~^;?(session.sid_length( )?=).*$~\1\264~' \
177+
-e 's~^;?(session.use_strict_mode( )?=).*$~\1\21~' \
178+
-e 's~^;?(user_ini.filename( )?=).*$~\1~g' \
175179
/etc/php.d/00-php.ini.default \
176180
> /etc/php.d/00-php.ini \
177181
&& sed \
@@ -211,9 +215,6 @@ RUN mkdir -p -m 750 ${PACKAGE_PATH} \
211215
&& mv \
212216
${PACKAGE_PATH}/public \
213217
${PACKAGE_PATH}/public_html \
214-
&& rm -f \
215-
${PACKAGE_PATH}/bin/php-wrapper \
216-
${PACKAGE_PATH}/etc/httpd/conf.d/50-fcgid.conf \
217218
&& $(\
218219
if [[ -f /usr/share/php-pecl-apc/apc.php ]]; then \
219220
cp \
@@ -224,8 +225,7 @@ RUN mkdir -p -m 750 ${PACKAGE_PATH} \
224225
&& chown -R app:app-www ${PACKAGE_PATH} \
225226
&& find ${PACKAGE_PATH} -type d -exec chmod 750 {} + \
226227
&& find ${PACKAGE_PATH}/var -type d -exec chmod 770 {} + \
227-
&& find ${PACKAGE_PATH} -type f -exec chmod 640 {} + \
228-
&& find ${PACKAGE_PATH}/bin -type f -exec chmod 750 {} +
228+
&& find ${PACKAGE_PATH} -type f -exec chmod 640 {} +
229229

230230
EXPOSE 80 443 8443
231231

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Tags and respective `Dockerfile` links
22

3-
- `centos-7`, `2.2.0` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-7/Dockerfile)
4-
- `centos-6`, `1.13.0` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
3+
- `centos-7`, `2.2.1` [(centos-7/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-7/Dockerfile)
4+
- `centos-6`, `1.13.1` [(centos-6/Dockerfile)](https://github.com/jdeathe/centos-ssh-apache-php-fcgi/blob/centos-6/Dockerfile)
55

66
## Overview
77

@@ -25,12 +25,12 @@ $ docker run -d \
2525
--name apache-php.1 \
2626
-p 8080:80 \
2727
-e "APACHE_SERVER_NAME=app-1.local" \
28-
jdeathe/centos-ssh-apache-php-fcgi:2.2.0
28+
jdeathe/centos-ssh-apache-php-fcgi:2.2.1
2929
```
3030

3131
Go to `http://{{docker-host}}:8080` using a browser where `{{docker-host}}` is the host name of your docker server and, if all went well, you should see the "Hello, world!" page.
3232

33-
![PHP "Hello, world!" - Chrome screenshot](https://raw.github.com/jdeathe/centos-ssh-apache-php-fcgi/centos-7/images/php-hello-world-chrome-fcgi.png)
33+
![PHP "Hello, world!" - Chrome screenshot](https://raw.github.com/jdeathe/centos-ssh-apache-php-fcgi/centos-7/images/php-hello-world-chrome-v2.2.1.png)
3434

3535
To be able to access the server using the "app-1.local" domain name you need to add a hosts file entry locally; such that the IP address of the Docker host resolves to the name "app-1.local". Alternatively, you can use the `elinks` browser installed in the container.
3636

@@ -41,7 +41,7 @@ $ docker exec -it apache-php.1 \
4141
elinks http://app-1.local
4242
```
4343

44-
![PHP "Hello, world!" - eLinks screenshot](https://raw.github.com/jdeathe/centos-ssh-apache-php-fcgi/centos-7/images/php-hello-world-elinks-fcgi.png)
44+
![PHP "Hello, world!" - eLinks screenshot](https://raw.github.com/jdeathe/centos-ssh-apache-php-fcgi/centos-7/images/php-hello-world-elinks-v2.2.1.png)
4545

4646
Verify the named container's process status and health.
4747

@@ -90,7 +90,7 @@ $ docker stop apache-php.1 && \
9090
--env "APACHE_SERVER_NAME=app-1.local" \
9191
--env "APACHE_SSL_PROTOCOL=All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1" \
9292
--env "PHP_OPTIONS_DATE_TIMEZONE=Europe/London" \
93-
jdeathe/centos-ssh-apache-php-fcgi:2.2.0
93+
jdeathe/centos-ssh-apache-php-fcgi:2.2.1
9494
```
9595

9696
#### Environment Variables
@@ -204,7 +204,7 @@ $ docker stop apache-php.1 && \
204204
--env "APACHE_SERVER_ALIAS=app-1" \
205205
--env "APACHE_SERVER_NAME=app-1.local" \
206206
--env "APACHE_MOD_SSL_ENABLED=true" \
207-
jdeathe/centos-ssh-apache-php-fcgi:2.2.0
207+
jdeathe/centos-ssh-apache-php-fcgi:2.2.1
208208
```
209209

210210
##### APACHE_MPM
-61.4 KB
Binary file not shown.
192 KB
Loading
-46 KB
Binary file not shown.
162 KB
Loading

src/usr/sbin/httpd-bootstrap

+11-4
Original file line numberDiff line numberDiff line change
@@ -1900,13 +1900,20 @@ function main ()
19001900
__enable_apache_modules
19011901
)"
19021902

1903-
# Set ownership for fcgid php-wrapper and socket if necessary
1904-
if [[ -d /var/run/mod_fcgid ]] \
1905-
&& [[ -d ${package_path}/bin ]]
1903+
# Set ownership for fcgid socket
1904+
if [[ -d /var/run/mod_fcgid ]]
19061905
then
19071906
chown -R \
19081907
"${apache_run_user}":"${apache_run_group}" \
1909-
{"${package_path}"/bin,/var/run/mod_fcgid}
1908+
/var/run/mod_fcgid
1909+
fi
1910+
1911+
# Set ownership for any package binaries
1912+
if [[ -d ${package_path}/bin ]]
1913+
then
1914+
chown -R \
1915+
"${apache_run_user}":"${apache_run_group}" \
1916+
"${package_path}"/bin
19101917
fi
19111918

19121919
__init_datadir \

0 commit comments

Comments
 (0)