Skip to content

Commit 78125d0

Browse files
committed
Add missing apache-foreground scripts, swap ssl version for 5.6 on stretch
1 parent 27c65bb commit 78125d0

File tree

8 files changed

+128
-4
lines changed

8 files changed

+128
-4
lines changed

5.6/stretch/apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ RUN set -eux; \
166166
libcurl4-openssl-dev \
167167
libedit-dev \
168168
libsqlite3-dev \
169-
libssl-dev \
169+
libssl1.0-dev \
170170
libxml2-dev \
171171
zlib1g-dev \
172172
${PHP_EXTRA_BUILD_DEPS:-} \

5.6/stretch/apache/apache2-foreground

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
5+
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
6+
7+
: "${APACHE_CONFDIR:=/etc/apache2}"
8+
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
9+
if test -f "$APACHE_ENVVARS"; then
10+
. "$APACHE_ENVVARS"
11+
fi
12+
13+
# Apache gets grumpy about PID files pre-existing
14+
: "${APACHE_RUN_DIR:=/var/run/apache2}"
15+
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
16+
rm -f "$APACHE_PID_FILE"
17+
18+
# create missing directories
19+
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
20+
for e in "${!APACHE_@}"; do
21+
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
22+
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
23+
# mkdir: cannot create directory '/var/lock': File exists
24+
dir="${!e}"
25+
while [ "$dir" != "$(dirname "$dir")" ]; do
26+
dir="$(dirname "$dir")"
27+
if [ -d "$dir" ]; then
28+
break
29+
fi
30+
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
31+
if [ -n "$absDir" ]; then
32+
mkdir -p "$absDir"
33+
fi
34+
done
35+
36+
mkdir -p "${!e}"
37+
fi
38+
done
39+
40+
exec apache2 -DFOREGROUND "$@"

5.6/stretch/cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ RUN set -eux; \
107107
libcurl4-openssl-dev \
108108
libedit-dev \
109109
libsqlite3-dev \
110-
libssl-dev \
110+
libssl1.0-dev \
111111
libxml2-dev \
112112
zlib1g-dev \
113113
${PHP_EXTRA_BUILD_DEPS:-} \

5.6/stretch/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RUN set -eux; \
108108
libcurl4-openssl-dev \
109109
libedit-dev \
110110
libsqlite3-dev \
111-
libssl-dev \
111+
libssl1.0-dev \
112112
libxml2-dev \
113113
zlib1g-dev \
114114
${PHP_EXTRA_BUILD_DEPS:-} \

5.6/stretch/zts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ RUN set -eux; \
108108
libcurl4-openssl-dev \
109109
libedit-dev \
110110
libsqlite3-dev \
111-
libssl-dev \
111+
libssl1.0-dev \
112112
libxml2-dev \
113113
zlib1g-dev \
114114
${PHP_EXTRA_BUILD_DEPS:-} \

7.0/stretch/apache/apache2-foreground

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
5+
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
6+
7+
: "${APACHE_CONFDIR:=/etc/apache2}"
8+
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
9+
if test -f "$APACHE_ENVVARS"; then
10+
. "$APACHE_ENVVARS"
11+
fi
12+
13+
# Apache gets grumpy about PID files pre-existing
14+
: "${APACHE_RUN_DIR:=/var/run/apache2}"
15+
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
16+
rm -f "$APACHE_PID_FILE"
17+
18+
# create missing directories
19+
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
20+
for e in "${!APACHE_@}"; do
21+
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
22+
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
23+
# mkdir: cannot create directory '/var/lock': File exists
24+
dir="${!e}"
25+
while [ "$dir" != "$(dirname "$dir")" ]; do
26+
dir="$(dirname "$dir")"
27+
if [ -d "$dir" ]; then
28+
break
29+
fi
30+
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
31+
if [ -n "$absDir" ]; then
32+
mkdir -p "$absDir"
33+
fi
34+
done
35+
36+
mkdir -p "${!e}"
37+
fi
38+
done
39+
40+
exec apache2 -DFOREGROUND "$@"

7.1/stretch/apache/apache2-foreground

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# Note: we don't just use "apache2ctl" here because it itself is just a shell-script wrapper around apache2 which provides extra functionality like "apache2ctl start" for launching apache2 in the background.
5+
# (also, when run as "apache2ctl <apache args>", it does not use "exec", which leaves an undesirable resident shell process)
6+
7+
: "${APACHE_CONFDIR:=/etc/apache2}"
8+
: "${APACHE_ENVVARS:=$APACHE_CONFDIR/envvars}"
9+
if test -f "$APACHE_ENVVARS"; then
10+
. "$APACHE_ENVVARS"
11+
fi
12+
13+
# Apache gets grumpy about PID files pre-existing
14+
: "${APACHE_RUN_DIR:=/var/run/apache2}"
15+
: "${APACHE_PID_FILE:=$APACHE_RUN_DIR/apache2.pid}"
16+
rm -f "$APACHE_PID_FILE"
17+
18+
# create missing directories
19+
# (especially APACHE_RUN_DIR, APACHE_LOCK_DIR, and APACHE_LOG_DIR)
20+
for e in "${!APACHE_@}"; do
21+
if [[ "$e" == *_DIR ]] && [[ "${!e}" == /* ]]; then
22+
# handle "/var/lock" being a symlink to "/run/lock", but "/run/lock" not existing beforehand, so "/var/lock/something" fails to mkdir
23+
# mkdir: cannot create directory '/var/lock': File exists
24+
dir="${!e}"
25+
while [ "$dir" != "$(dirname "$dir")" ]; do
26+
dir="$(dirname "$dir")"
27+
if [ -d "$dir" ]; then
28+
break
29+
fi
30+
absDir="$(readlink -f "$dir" 2>/dev/null || :)"
31+
if [ -n "$absDir" ]; then
32+
mkdir -p "$absDir"
33+
fi
34+
done
35+
36+
mkdir -p "${!e}"
37+
fi
38+
done
39+
40+
exec apache2 -DFOREGROUND "$@"

update.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ for version in "${versions[@]}"; do
168168
# sodium is part of php core 7.2+ https://wiki.php.net/rfc/libsodium
169169
sed -ri '/sodium/d' "$version/$suite/$variant/Dockerfile"
170170
fi
171+
if [ "$majorVersion" = '5' -a "$suite" = 'stretch' ]; then
172+
# php 5 still needs older ssl
173+
sed -ri 's/libssl-dev/libssl1.0-dev/g' "$version/$suite/$variant/Dockerfile"
174+
fi
171175

172176
# remove any _extra_ blank lines created by the deletions above
173177
awk '

0 commit comments

Comments
 (0)