Skip to content

Commit 29fdca7

Browse files
committed
Add ZTS images
1 parent 6530e7a commit 29fdca7

File tree

20 files changed

+1096
-100
lines changed

20 files changed

+1096
-100
lines changed

.github/workflows/ci.yml

Lines changed: 166 additions & 24 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,53 @@
55
This repository builds `ghcr.io/mvorisek/image-php` image and publishes the following tags:
66

77
- `7.3` `7.3-alpine`
8+
- `7.3-zts` `7.3-zts-alpine`
89
- `7.4` `7.4-alpine`
10+
- `7.4-zts` `7.4-zts-alpine`
911
- `8.0` `8.0-alpine` `latest` `latest-alpine`
12+
- `8.0-zts` `8.0-zts-alpine` `latest-zts` `latest-zts-alpine`
1013
- `8.1` `8.1-alpine`
14+
- `8.1-zts` `8.1-zts-alpine`
1115
- `7.3-debian`
16+
- `7.3-zts-debian`
1217
- `7.4-debian`
18+
- `7.4-zts-debian`
1319
- `8.0-debian` `latest-debian`
20+
- `8.0-zts-debian` `latest-zts-debian`
1421
- `8.1-debian`
22+
- `8.1-zts-debian`
1523
- `7.3-node` `7.3-alpine-node`
24+
- `7.3-zts-node` `7.3-zts-alpine-node`
1625
- `7.4-node` `7.4-alpine-node`
26+
- `7.4-zts-node` `7.4-zts-alpine-node`
1727
- `8.0-node` `8.0-alpine-node` `latest-node` `latest-alpine-node`
28+
- `8.0-zts-node` `8.0-zts-alpine-node` `latest-zts-node` `latest-zts-alpine-node`
1829
- `8.1-node` `8.1-alpine-node`
30+
- `8.1-zts-node` `8.1-zts-alpine-node`
1931
- `7.3-debian-node`
32+
- `7.3-zts-debian-node`
2033
- `7.4-debian-node`
34+
- `7.4-zts-debian-node`
2135
- `8.0-debian-node` `latest-debian-node`
36+
- `8.0-zts-debian-node` `latest-zts-debian-node`
2237
- `8.1-debian-node`
38+
- `8.1-zts-debian-node`
2339
- `7.3-selenium` `7.3-alpine-selenium`
40+
- `7.3-zts-selenium` `7.3-zts-alpine-selenium`
2441
- `7.4-selenium` `7.4-alpine-selenium`
42+
- `7.4-zts-selenium` `7.4-zts-alpine-selenium`
2543
- `8.0-selenium` `8.0-alpine-selenium` `latest-selenium` `latest-alpine-selenium`
44+
- `8.0-zts-selenium` `8.0-zts-alpine-selenium` `latest-zts-selenium` `latest-zts-alpine-selenium`
2645
- `8.1-selenium` `8.1-alpine-selenium`
46+
- `8.1-zts-selenium` `8.1-zts-alpine-selenium`
2747
- `7.3-debian-selenium`
48+
- `7.3-zts-debian-selenium`
2849
- `7.4-debian-selenium`
50+
- `7.4-zts-debian-selenium`
2951
- `8.0-debian-selenium` `latest-debian-selenium`
52+
- `8.0-zts-debian-selenium` `latest-zts-debian-selenium`
3053
- `8.1-debian-selenium`
54+
- `8.1-zts-debian-selenium`
3155

3256
## Running Locally
3357

data/7.3-alpine/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.3-alpine as base
1+
FROM php:7.3-alpine as basic
22

33
# install basic system tools
44
RUN apk update \
@@ -42,13 +42,14 @@ RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
4242
# install Composer
4343
RUN install-php-extensions @composer
4444

45-
FROM base as base__test
45+
FROM basic as basic__test
46+
RUN php --version
4647
COPY test.php ./
4748
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
4849
RUN composer diagnose
4950

5051

51-
FROM base as node
52+
FROM basic as node
5253

5354
# install Node JS with npm
5455
RUN apk update \

data/7.3-debian/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.3-bullseye as base
1+
FROM php:7.3-bullseye as basic
22

33
# install basic system tools
44
RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
@@ -41,13 +41,14 @@ RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
4141
# install Composer
4242
RUN install-php-extensions @composer
4343

44-
FROM base as base__test
44+
FROM basic as basic__test
45+
RUN php --version
4546
COPY test.php ./
4647
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
4748
RUN composer diagnose
4849

4950

50-
FROM base as node
51+
FROM basic as node
5152

5253
# install Node JS with npm
5354
RUN apt-get -y update \

data/7.3-zts-alpine/Dockerfile

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
FROM php:7.3-zts-alpine as basic
2+
3+
# install basic system tools
4+
RUN apk update \
5+
&& apk upgrade \
6+
&& apk add bash git make unzip gnupg ca-certificates coreutils \
7+
&& rm -rf /var/cache/apk/* \
8+
&& git config --system url."https://github.com/".insteadOf "[email protected]:" \
9+
&& git config --system url."https://github.com/".insteadOf "ssh://[email protected]/"
10+
11+
# install common PHP extensions
12+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
13+
RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
14+
bcmath \
15+
exif \
16+
gd \
17+
gmp \
18+
igbinary \
19+
imagick \
20+
imap \
21+
intl \
22+
mysqli \
23+
oci8 \
24+
opcache \
25+
pcntl \
26+
pdo_mysql \
27+
pdo_oci \
28+
pdo_pgsql \
29+
pdo_sqlsrv \
30+
redis \
31+
sockets \
32+
tidy \
33+
xdebug \
34+
xsl \
35+
zip \
36+
# remove Ghostscript binary, reduce Alpine image size by 23 MB, remove once https://github.com/mlocati/docker-php-extension-installer/issues/519 is fixed
37+
&& rm /usr/bin/gs \
38+
# pack Oracle Instant Client libs, reduce image size by 85 MB
39+
&& rm /usr/lib/oracle/*/client64/lib/*.jar && tar -czvf /usr/lib/oracle-pack.tar.gz -C / /usr/lib/oracle /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && rm -rf /usr/lib/oracle/* /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && mv /usr/lib/oracle-pack.tar.gz /usr/lib/oracle/pack.tar.gz \
40+
&& { echo '#!/bin/sh'; echo 'if [ ! -d /usr/lib/oracle/*/client64 ]; then'; echo ' tar -xzf /usr/lib/oracle/pack.tar.gz -C / && rm /usr/lib/oracle/pack.tar.gz'; echo 'fi'; } > /usr/lib/oracle/setup.sh && chmod +x /usr/lib/oracle/setup.sh
41+
42+
# install Composer
43+
RUN install-php-extensions @composer
44+
45+
FROM basic as basic__test
46+
RUN php --version
47+
COPY test.php ./
48+
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
49+
RUN composer diagnose
50+
51+
52+
FROM basic as node
53+
54+
# install Node JS with npm
55+
RUN apk update \
56+
&& apk add nodejs npm \
57+
&& rm -rf /var/cache/apk/*
58+
59+
FROM node as node__test
60+
RUN npm version
61+
62+
63+
FROM node as selenium
64+
65+
# install Selenium
66+
RUN apk update \
67+
&& apk add openjdk11-jre-headless xvfb ttf-freefont \
68+
&& rm -rf /var/cache/apk/* \
69+
&& curl --fail --silent --show-error -L "https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar" -o /opt/selenium-server-standalone.jar
70+
71+
# install Chrome
72+
RUN apk update \
73+
&& apk add chromium chromium-chromedriver nss-tools \
74+
&& rm -rf /var/cache/apk/*
75+
76+
# install Firefox
77+
RUN apk update \
78+
&& apk add firefox \
79+
&& rm -rf /var/cache/apk/* \
80+
&& curl --fail --silent --show-error -L "https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz" -o /tmp/geckodriver.tar.gz \
81+
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz && rm /tmp/geckodriver.tar.gz \
82+
&& chmod 755 /opt/geckodriver && ln -s /opt/geckodriver /usr/bin/geckodriver
83+
84+
FROM selenium as selenium__test
85+
RUN chromium-browser --version
86+
RUN firefox --version

data/7.3-zts-debian/Dockerfile

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
FROM php:7.3-zts-bullseye as basic
2+
3+
# install basic system tools
4+
RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
5+
&& apt-get -y update \
6+
&& apt-get -y upgrade \
7+
&& apt-get -y install bash git make unzip gnupg ca-certificates apt-utils apt-transport-https netcat \
8+
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/* \
9+
&& git config --system url."https://github.com/".insteadOf "[email protected]:" \
10+
&& git config --system url."https://github.com/".insteadOf "ssh://[email protected]/"
11+
12+
# install common PHP extensions
13+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
14+
RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
15+
bcmath \
16+
exif \
17+
gd \
18+
gmp \
19+
igbinary \
20+
imagick \
21+
imap \
22+
intl \
23+
mysqli \
24+
oci8 \
25+
opcache \
26+
pcntl \
27+
pdo_mysql \
28+
pdo_oci \
29+
pdo_pgsql \
30+
pdo_sqlsrv \
31+
redis \
32+
sockets \
33+
tidy \
34+
xdebug \
35+
xsl \
36+
zip \
37+
# pack Oracle Instant Client libs, reduce image size by 85 MB
38+
&& rm /usr/lib/oracle/*/client64/lib/*.jar && tar -czvf /usr/lib/oracle-pack.tar.gz -C / /usr/lib/oracle /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && rm -rf /usr/lib/oracle/* /usr/local/etc/php/conf.d/docker-php-ext-pdo_oci.ini /usr/local/etc/php/conf.d/docker-php-ext-oci8.ini && mv /usr/lib/oracle-pack.tar.gz /usr/lib/oracle/pack.tar.gz \
39+
&& { echo '#!/bin/sh'; echo 'if [ ! -d /usr/lib/oracle/*/client64 ]; then'; echo ' tar -xzf /usr/lib/oracle/pack.tar.gz -C / && rm /usr/lib/oracle/pack.tar.gz'; echo 'fi'; } > /usr/lib/oracle/setup.sh && chmod +x /usr/lib/oracle/setup.sh
40+
41+
# install Composer
42+
RUN install-php-extensions @composer
43+
44+
FROM basic as basic__test
45+
RUN php --version
46+
COPY test.php ./
47+
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
48+
RUN composer diagnose
49+
50+
51+
FROM basic as node
52+
53+
# install Node JS with npm
54+
RUN apt-get -y update \
55+
&& apt-get -y install nodejs npm \
56+
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/* && npm install --global npm@latest
57+
58+
FROM node as node__test
59+
RUN npm version
60+
61+
62+
FROM node as selenium
63+
64+
# install Selenium
65+
RUN apt-get -y update \
66+
&& apt-get -y install openjdk-11-jre-headless xvfb fonts-freefont-ttf \
67+
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/* \
68+
&& curl --fail --silent --show-error -L "https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar" -o /opt/selenium-server-standalone.jar
69+
70+
# install Chrome
71+
RUN apt-get -y update \
72+
&& apt-get -y install chromium chromium-driver libnss3-tools \
73+
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/*
74+
75+
# install Firefox
76+
RUN apt-get -y update \
77+
&& apt-get -y install firefox-esr \
78+
&& apt-get purge -y --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/* \
79+
&& curl --fail --silent --show-error -L "https://github.com/mozilla/geckodriver/releases/download/v0.29.1/geckodriver-v0.29.1-linux64.tar.gz" -o /tmp/geckodriver.tar.gz \
80+
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz && rm /tmp/geckodriver.tar.gz \
81+
&& chmod 755 /opt/geckodriver && ln -s /opt/geckodriver /usr/bin/geckodriver
82+
83+
FROM selenium as selenium__test
84+
RUN chromium --version
85+
RUN firefox --version

data/7.4-alpine/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-alpine as base
1+
FROM php:7.4-alpine as basic
22

33
# install basic system tools
44
RUN apk update \
@@ -42,13 +42,14 @@ RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
4242
# install Composer
4343
RUN install-php-extensions @composer
4444

45-
FROM base as base__test
45+
FROM basic as basic__test
46+
RUN php --version
4647
COPY test.php ./
4748
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
4849
RUN composer diagnose
4950

5051

51-
FROM base as node
52+
FROM basic as node
5253

5354
# install Node JS with npm
5455
RUN apk update \

data/7.4-debian/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-bullseye as base
1+
FROM php:7.4-bullseye as basic
22

33
# install basic system tools
44
RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
@@ -41,13 +41,14 @@ RUN IPE_GD_WITHOUTAVIF=1 install-php-extensions \
4141
# install Composer
4242
RUN install-php-extensions @composer
4343

44-
FROM base as base__test
44+
FROM basic as basic__test
45+
RUN php --version
4546
COPY test.php ./
4647
RUN (/usr/lib/oracle/setup.sh || true) && php test.php
4748
RUN composer diagnose
4849

4950

50-
FROM base as node
51+
FROM basic as node
5152

5253
# install Node JS with npm
5354
RUN apt-get -y update \

0 commit comments

Comments
 (0)