Repository navigation
Expand file tree
/
Copy pathDockerfile.php_alpine
More file actions
65 lines (61 loc) · 2.4 KB
/
Copy pathDockerfile.php_alpine
File metadata and controls
65 lines (61 loc) · 2.4 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# docker build --pull --no-cache -f Dockerfile.php_alpine -t pdo_duckdb_php_alpine .
# docker run --rm -it pdo_duckdb_php_alpine
# php 8.2
FROM php:8.2-cli-alpine AS php82
ENV TERM="xterm-256color"
ENV LC_ALL="C.UTF-8"
RUN <<EOF
set -euxo pipefail
apk update
apk add --no-cache tzdata libstdc++
ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime
curl -fsSL -o /tmp/pie https://github.com/php/pie/releases/latest/download/pie.phar
php /tmp/pie install --no-build-tools-check -v thomas-0816/pdo-duckdb-php:^2.0.0.0-beta
php -m | grep duckdb
php -r 'print_r((new PDO("duckdb::memory:"))->query("SELECT 42 as n")->fetch(PDO::FETCH_ASSOC));'
EOF
# php 8.3
FROM php:8.3-cli-alpine AS php83
COPY --from=php82 /etc/issue /etc/issue
ENV TERM="xterm-256color"
ENV LC_ALL="C.UTF-8"
RUN <<EOF
set -euxo pipefail
apk update
apk add --no-cache tzdata libstdc++
ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime
curl -fsSL -o /tmp/pie https://github.com/php/pie/releases/latest/download/pie.phar
php /tmp/pie install --no-build-tools-check -v thomas-0816/pdo-duckdb-php:^2.0.0.0-beta
php -m | grep duckdb
php -r 'print_r((new PDO("duckdb::memory:"))->query("SELECT 42 as n")->fetch(PDO::FETCH_ASSOC));'
EOF
# php 8.4
FROM php:8.4-cli-alpine AS php84
COPY --from=php83 /etc/issue /etc/issue
ENV TERM="xterm-256color"
ENV LC_ALL="C.UTF-8"
RUN <<EOF
set -euxo pipefail
apk update
apk add --no-cache tzdata libstdc++
ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime
curl -fsSL -o /tmp/pie https://github.com/php/pie/releases/latest/download/pie.phar
php /tmp/pie install --no-build-tools-check -v thomas-0816/pdo-duckdb-php:^2.0.0.0-beta
php -m | grep duckdb
php -r 'print_r((new PDO("duckdb::memory:"))->query("SELECT 42 as n")->fetch(PDO::FETCH_ASSOC));'
EOF
# php 8.5
FROM php:8.5-cli-alpine AS php85
COPY --from=php84 /etc/issue /etc/issue
ENV TERM="xterm-256color"
ENV LC_ALL="C.UTF-8"
RUN <<EOF
set -euxo pipefail
apk update
apk add --no-cache tzdata libstdc++
ln -s /usr/share/zoneinfo/Europe/Brussels /etc/localtime
curl -fsSL -o /tmp/pie https://github.com/php/pie/releases/latest/download/pie.phar
php /tmp/pie install --no-build-tools-check -v thomas-0816/pdo-duckdb-php:^2.0.0.0-beta
php -m | grep duckdb
php -r 'print_r((new PDO("duckdb::memory:"))->query("SELECT 42 as n")->fetch(PDO::FETCH_ASSOC));'
EOF