Skip to content

Commit 9d3f04b

Browse files
authored
Merge pull request #17 from devilbox/release-0.25
New images
2 parents f1476cb + 8865e97 commit 9d3f04b

17 files changed

Lines changed: 655 additions & 143 deletions

.github/workflows/action_branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
# (2/2) Build
2323
docker:
2424
needs: [params]
25-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
25+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2626
with:
2727
enabled: true
2828
can_deploy: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/release-') }}

.github/workflows/action_pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# (2/2) Build
2525
docker:
2626
needs: [params]
27-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2828
with:
2929
enabled: true
3030
can_deploy: false

.github/workflows/action_schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
# (2/2) Build
2525
docker:
2626
needs: [params]
27-
uses: devilbox/github-actions/.github/workflows/docker-name-version-arch.yml@master
27+
uses: devilbox/github-actions/.github/workflows/docker-name-version-flavour-arch.yml@master
2828
with:
2929
enabled: true
3030
can_deploy: true

.github/workflows/params.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ env:
1515
{
1616
"NAME": "PHP",
1717
"VERSION": ["5.3"],
18+
"FLAVOUR": ["jessie", "stretch", "latest"],
1819
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"]
1920
}
2021
]

Dockerfile

Lines changed: 0 additions & 136 deletions
This file was deleted.

Dockerfiles/Dockerfile.jessie

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
FROM debian:jessie-slim
2+
MAINTAINER "cytopia" <cytopia@everythingcli.org>
3+
4+
5+
ENV PHP_VERSION=5.3.29
6+
ENV PHP_INI_DIR=/usr/local/etc/php
7+
8+
ENV OPENSSL_VERSION=1.0.1t
9+
10+
ENV PHP_BUILD_DEPS \
11+
autoconf2.13 \
12+
libbison-dev \
13+
libcurl4-openssl-dev \
14+
libfl-dev \
15+
libmysqlclient-dev \
16+
libpcre3-dev \
17+
libreadline6-dev \
18+
librecode-dev \
19+
libsqlite3-dev \
20+
libssl-dev \
21+
libxml2-dev
22+
23+
ENV PHP_RUNTIME_DEPS \
24+
libmysqlclient18 \
25+
libpcre3 \
26+
librecode0 \
27+
libsqlite3-0 \
28+
libssl1.0.0 \
29+
libxml2 \
30+
xz-utils
31+
32+
ENV BUILD_TOOLS \
33+
autoconf \
34+
ca-certificates \
35+
curl \
36+
dpkg-dev \
37+
file \
38+
flex \
39+
g++ \
40+
gcc \
41+
libc-dev \
42+
make \
43+
patch \
44+
pkg-config \
45+
re2c \
46+
xz-utils
47+
48+
ENV BUILD_TOOLS_32 \
49+
g++-multilib \
50+
gcc-multilib
51+
52+
ENV RUNTIME_TOOLS \
53+
ca-certificates \
54+
curl
55+
56+
57+
###
58+
### Build OpenSSL
59+
###
60+
RUN set -eux \
61+
# Install Dependencies
62+
&& apt-get update \
63+
&& apt-get install -y --no-install-recommends --no-install-suggests \
64+
${BUILD_TOOLS} \
65+
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
66+
apt-get install -y --no-install-recommends --no-install-suggests \
67+
${BUILD_TOOLS_32}; \
68+
fi \
69+
# Fetch OpenSSL
70+
&& cd /tmp \
71+
&& mkdir openssl \
72+
&& update-ca-certificates \
73+
&& curl -sS -k -L --fail "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" -o openssl.tar.gz \
74+
&& curl -sS -k -L --fail "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz.asc" -o openssl.tar.gz.asc \
75+
&& tar -xzf openssl.tar.gz -C openssl --strip-components=1 \
76+
&& cd /tmp/openssl \
77+
# Build OpenSSL
78+
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
79+
setarch i386 ./config -m32; \
80+
else \
81+
./config; \
82+
fi \
83+
&& make depend \
84+
&& make -j"$(nproc)" \
85+
&& make install \
86+
# Cleanup
87+
&& rm -rf /tmp/* \
88+
# Ensure libs are linked to correct architecture directory
89+
&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
90+
&& mkdir -p "/usr/local/ssl/lib/${debMultiarch}" \
91+
&& ln -s /usr/local/ssl/lib/* "/usr/local/ssl/lib/${debMultiarch}/" \
92+
# Remove Dependencies
93+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
94+
${BUILD_TOOLS} \
95+
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
96+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
97+
${BUILD_TOOLS_32}; \
98+
fi \
99+
&& apt-get clean \
100+
&& rm -rf /var/lib/apt/lists/*
101+
102+
103+
###
104+
### Setup PHP directories
105+
###
106+
RUN set -eux \
107+
&& mkdir -p ${PHP_INI_DIR}/conf.d \
108+
&& mkdir -p /usr/src/php
109+
110+
111+
###
112+
### Copy PHP scripts
113+
###
114+
COPY data/docker-php-source /usr/local/bin/
115+
116+
117+
###
118+
### Build PHP
119+
###
120+
RUN set -eux \
121+
# Install Dependencies
122+
&& apt-get update \
123+
&& apt-get install -y --no-install-recommends --no-install-suggests \
124+
${PHP_BUILD_DEPS} \
125+
${BUILD_TOOLS} \
126+
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
127+
apt-get install -y --no-install-recommends --no-install-suggests \
128+
${BUILD_TOOLS_32}; \
129+
fi \
130+
# Fetch PHP
131+
&& curl -sS -k -L --fail "http://php.net/get/php-$PHP_VERSION.tar.xz/from/this/mirror" -o /usr/src/php.tar.xz \
132+
&& curl -sS -k -L --fail "http://php.net/get/php-$PHP_VERSION.tar.xz.asc/from/this/mirror" -o /usr/src/php.tar.xz.asc \
133+
# Setup Requirements
134+
&& docker-php-source extract \
135+
&& cd /usr/src/php \
136+
\
137+
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
138+
&& debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)" \
139+
\
140+
# https://bugs.php.net/bug.php?id=74125
141+
&& if [ ! -d /usr/include/curl ]; then \
142+
ln -sT "/usr/include/${debMultiarch}/curl" /usr/local/include/curl; \
143+
fi \
144+
# Build PHP
145+
&& ./configure \
146+
--host="${gnuArch}" \
147+
--with-libdir="/lib/${debMultiarch}/" \
148+
--with-config-file-path="${PHP_INI_DIR}" \
149+
--with-config-file-scan-dir="${PHP_INI_DIR}/conf.d" \
150+
--enable-fpm \
151+
--with-fpm-user=www-data \
152+
--with-fpm-group=www-data \
153+
--disable-cgi \
154+
--enable-mysqlnd \
155+
--enable-pdo \
156+
--with-mysql \
157+
--with-mysqli \
158+
--with-curl \
159+
--with-openssl=/usr/local/ssl \
160+
--with-readline \
161+
--with-recode \
162+
--with-zlib \
163+
&& make -j"$(nproc)" \
164+
&& make install \
165+
# Cleanup
166+
&& make clean \
167+
&& { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
168+
&& docker-php-source delete \
169+
# Remove Dependencies
170+
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
171+
${PHP_BUILD_DEPS} \
172+
${BUILD_TOOLS} \
173+
&& if [ "$(dpkg-architecture --query DEB_HOST_ARCH)" = "i386" ]; then \
174+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false \
175+
${BUILD_TOOLS_32}; \
176+
fi \
177+
# Install Run-time requirements
178+
&& apt-get update \
179+
&& apt-get install -y --no-install-recommends --no-install-suggests \
180+
${PHP_RUNTIME_DEPS} \
181+
${RUNTIME_TOOLS} \
182+
&& apt-get clean \
183+
&& rm -rf /var/lib/apt/lists/*
184+
185+
186+
COPY data/docker-php-* /usr/local/bin/
187+
188+
WORKDIR /var/www/html
189+
COPY data/php-fpm.conf /usr/local/etc/
190+
COPY data/php.ini /usr/local/etc/php/php.ini
191+
192+
EXPOSE 9000
193+
CMD ["php-fpm"]

0 commit comments

Comments
 (0)