Skip to content

Commit b81d335

Browse files
update php 7 Dockerfile
1 parent 917df1e commit b81d335

9 files changed

Lines changed: 28 additions & 159 deletions

File tree

.cnb.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ main:
3838
- name: docker build and push
3939
script: docker buildx build
4040
--platform linux/amd64,linux/arm/v7,linux/arm64/v8
41-
--build-arg PHP_VERSION=$PHP_VERSION
42-
--build-arg INSTALL_EXT_VERSION=$INSTALL_EXT_VERSION
4341
-t $IMAGE_TAG
4442
-f php/$PHP_VERSION/Dockerfile
4543
php/$PHP_VERSION/

.cnb/web_trigger.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ branch:
1010
name: "PHP 版本"
1111
description: "PHP 版本"
1212
default: "7.2.34"
13-
required: true
14-
INSTALL_EXT_VERSION:
15-
name: "install-php-extensions 版本"
16-
description: "install-php-extensions 版本"
17-
default: "2.8.5"
18-
required: true
13+
required: true
1914
- buttons:
2015
- name: "编译 Node.js 镜像"
2116
event: web_trigger_build_node_image

.github/workflows/php7-release.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
description: 'PHP 7.3 Version'
1212
default: '7.3.33'
1313
required: true
14-
php72Version:
15-
description: 'PHP 7.2 Version'
16-
default: '7.2.34'
17-
required: true
1814

1915
jobs:
2016
docker:
@@ -62,17 +58,3 @@ jobs:
6258
1panel/php:${{ github.event.inputs.php73Version }}-fpm
6359
cache-from: type=gha
6460
cache-to: type=gha,mode=max
65-
66-
- name: Build PHP-7.2 and Push
67-
uses: docker/build-push-action@v5
68-
with:
69-
context: php/7
70-
file: php/7/Dockerfile
71-
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
72-
push: true
73-
build-args:
74-
PHP_VERSION=${{ github.event.inputs.php72Version }}
75-
tags: |
76-
1panel/php:${{ github.event.inputs.php72Version }}-fpm
77-
cache-from: type=gha
78-
cache-to: type=gha,mode=max

.github/workflows/php7.0.33-release.yml

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

.github/workflows/php7.1.33-release.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
description: 'PHP 7.x Version'
88
default: '7.2.34'
99
required: true
10-
install_ext_version:
11-
description: 'install-php-extensions version'
12-
default: '2.8.5'
13-
required: true
14-
1510
jobs:
1611
docker:
1712
runs-on: ubuntu-latest
@@ -38,8 +33,6 @@ jobs:
3833
file: php/${{ github.event.inputs.php_version }}/Dockerfile
3934
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8
4035
push: true
41-
build-args:
42-
INSTALL_EXT_VERSION=${{ github.event.inputs.install_ext_version }}
4336
tags: |
4437
1panel/php:${{ github.event.inputs.php_version }}-fpm
4538
cache-from: type=gha

php/7.0.33/Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
FROM php:7.0.33-fpm AS php-source
88

99
FROM debian:bullseye-slim
10-
ARG INSTALL_EXT_VERSION
1110

1211
# prevent Debian's PHP packages from being installed
1312
# https://github.com/docker-library/php/pull/542
@@ -223,20 +222,18 @@ COPY ./data/supervisord.conf /etc/supervisord.conf
223222
RUN apt-get update && \
224223
apt-get install -y python3 python3-pip git wget&& \
225224
rm -rf /var/lib/apt/lists/* && \
226-
curl -fsSL -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/download/${INSTALL_EXT_VERSION}/install-php-extensions && \
227-
chmod uga+x /usr/local/bin/install-php-extensions
228-
229-
RUN cd /tmp && \
225+
curl -fsSL -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
226+
chmod uga+x /usr/local/bin/install-php-extensions && \
227+
cd /tmp && \
230228
tar -xzvf supervisor-4.2.5.tar.gz && \
231229
cd supervisor-4.2.5 && \
232230
python3 setup.py install && \
233-
mkdir -p /var/log/supervisor /etc/supervisor/conf.d
234-
235-
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
236-
&& php /tmp/composer-setup.php --install-dir=/tmp \
237-
&& mv /tmp/composer.phar /usr/bin/composer \
238-
&& chmod +x /usr/bin/composer \
239-
&& rm -rf /tmp/composer-setup.php
231+
mkdir -p /var/log/supervisor /etc/supervisor/conf.d && \
232+
curl -o /tmp/composer-setup.php https://getcomposer.org/installer &&\
233+
php /tmp/composer-setup.php --install-dir=/tmp && \
234+
mv /tmp/composer.phar /usr/bin/composer && \
235+
chmod +x /usr/bin/composer &&\
236+
rm -rf /tmp/composer-setup.php
240237

241238

242239
ENV COMPOSER_HOME=/tmp/.composer

php/7.1.33/Dockerfile

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
FROM php:7.1.33-fpm AS php-source
77

88
FROM debian:bullseye-slim
9-
ARG INSTALL_EXT_VERSION
109

1110
# prevent Debian's PHP packages from being installed
1211
# https://github.com/docker-library/php/pull/542
@@ -233,20 +232,18 @@ COPY ./data/supervisord.conf /etc/supervisord.conf
233232
RUN apt-get update && \
234233
apt-get install -y python3 python3-pip git wget&& \
235234
rm -rf /var/lib/apt/lists/* && \
236-
curl -fsSL -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/download/${INSTALL_EXT_VERSION}/install-php-extensions && \
237-
chmod uga+x /usr/local/bin/install-php-extensions
238-
239-
RUN cd /tmp && \
235+
curl -fsSL -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
236+
chmod uga+x /usr/local/bin/install-php-extensions && \
237+
cd /tmp && \
240238
tar -xzvf supervisor-4.2.5.tar.gz && \
241239
cd supervisor-4.2.5 && \
242240
python3 setup.py install && \
243-
mkdir -p /var/log/supervisor /etc/supervisor/conf.d
244-
245-
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
246-
&& php /tmp/composer-setup.php --install-dir=/tmp \
247-
&& mv /tmp/composer.phar /usr/bin/composer \
248-
&& chmod +x /usr/bin/composer \
249-
&& rm -rf /tmp/composer-setup.php
241+
mkdir -p /var/log/supervisor /etc/supervisor/conf.d && \
242+
curl -o /tmp/composer-setup.php https://getcomposer.org/installer &&\
243+
php /tmp/composer-setup.php --install-dir=/tmp && \
244+
mv /tmp/composer.phar /usr/bin/composer && \
245+
chmod +x /usr/bin/composer &&\
246+
rm -rf /tmp/composer-setup.php
250247

251248
ENV COMPOSER_HOME=/tmp/.composer
252249

php/7.2.34/Dockerfile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
FROM php:7.2.34-fpm AS php-source
77

88
FROM debian:bullseye-slim
9-
ARG INSTALL_EXT_VERSION
109

1110
# prevent Debian's PHP packages from being installed
1211
# https://github.com/docker-library/php/pull/542
@@ -248,21 +247,18 @@ COPY ./data/supervisord.conf /etc/supervisord.conf
248247
RUN apt-get update && \
249248
apt-get install -y python3 python3-pip git wget&& \
250249
rm -rf /var/lib/apt/lists/* && \
251-
curl -fsSL -o /usr/local/bin/install-php-extensions \
252-
https://github.com/mlocati/docker-php-extension-installer/releases/download/${INSTALL_EXT_VERSION}/install-php-extensions && \
253-
chmod uga+x /usr/local/bin/install-php-extensions
254-
255-
RUN cd /tmp && \
250+
curl -fsSL -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && \
251+
chmod uga+x /usr/local/bin/install-php-extensions && \
252+
cd /tmp && \
256253
tar -xzvf supervisor-4.2.5.tar.gz && \
257254
cd supervisor-4.2.5 && \
258255
python3 setup.py install && \
259-
mkdir -p /var/log/supervisor /etc/supervisor/conf.d
260-
261-
RUN curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
262-
&& php /tmp/composer-setup.php --install-dir=/tmp \
263-
&& mv /tmp/composer.phar /usr/bin/composer \
264-
&& chmod +x /usr/bin/composer \
265-
&& rm -rf /tmp/composer-setup.php
256+
mkdir -p /var/log/supervisor /etc/supervisor/conf.d && \
257+
curl -o /tmp/composer-setup.php https://getcomposer.org/installer &&\
258+
php /tmp/composer-setup.php --install-dir=/tmp && \
259+
mv /tmp/composer.phar /usr/bin/composer && \
260+
chmod +x /usr/bin/composer &&\
261+
rm -rf /tmp/composer-setup.php
266262

267263
ENV COMPOSER_HOME=/tmp/.composer
268264

0 commit comments

Comments
 (0)