-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathgenerate.sh
More file actions
35 lines (30 loc) · 794 Bytes
/
generate.sh
File metadata and controls
35 lines (30 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
declare -A apcu_version
apcu_version=(
[5.6]='apcu-4.0.11'
[7.0]='apcu-stable'
[7.1]='apcu-stable'
)
declare -A xdebug_version
xdebug_version=(
[5.6]='xdebug-stable'
[7.0]='xdebug-stable'
[7.1]='xdebug-stable'
)
declare -A extensions_dir
extensions_dir=(
[5.6]='no-debug-non-zts-20131226'
[7.0]='no-debug-non-zts-20151012'
[7.1]='no-debug-non-zts-20160303'
)
for version in 5.6 7.0 7.1; do
mkdir -p "${version}"
dockerfile=${version}/Dockerfile
echo "FROM php:${version}-apache" > ${dockerfile}
echo >> ${dockerfile}
cat Dockerfile \
| sed "s/#APCU_VERSION#/${apcu_version[${version}]}/g" \
| sed "s/#XDEBUG_VERSION#/${xdebug_version[${version}]}/g" \
| sed "s/#EXTENSION_DIR#/${extensions_dir[${version}]}/g" \
>> ${dockerfile}
done