Skip to content

Commit 34a2f14

Browse files
committed
fix: use 7.x.Dockerfile for php7.4
1 parent adf6eed commit 34a2f14

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/php.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ jobs:
172172
UBUNTU_VERSION=24.04
173173
XDEBUG_VERSION=3.1.6
174174
- version: 7.4
175+
file: 7.x.Dockerfile
175176
build-args: |
176177
PHP_VERSION=7.4
177178
UBUNTU_VERSION=20.04

php/7.x.Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
1111

1212
ENV PHP_VERSION=${PHP_VERSION} \
1313
PHP_DISPLAY_ERRORS=1 \
14-
PHP_DISPLAY_STARTUP_ERRORS=0 \
14+
PHP_DISPLAY_STARTUP_ERRORS=1 \
1515
PHP_MEMORY_LIMIT=128m \
1616
PHP_MAX_EXECUTION_TIME=30 \
1717
PHP_MAX_INPUT_VARS=1500 \
@@ -26,7 +26,7 @@ ENV PHP_VERSION=${PHP_VERSION} \
2626
PHP_OPCACHE_PRELOAD_USER=www-data \
2727
PHP_OPCACHE_ENABLE_CLI=0 \
2828
PHP_OPCACHE_VALIDATE_TIMESTAMPS=1 \
29-
PHP_OPCACHE_FILE_CACHE=null \
29+
PHP_OPCACHE_FILE_CACHE="/tmp/opcache" \
3030
PHP_OPCACHE_FILE_CACHE_ONLY=0 \
3131
PHP_OPCACHE_REVALIDATE_FREQ=2 \
3232
PHP_REALPATH_CACHE_TTL=120 \
@@ -42,7 +42,11 @@ ENV PHP_VERSION=${PHP_VERSION} \
4242
PHP_FPM_PM_MIN_SPARE_SERVERS=2 \
4343
PHP_FPM_PM_MAX_SPARE_SERVERS=4 \
4444
PHP_FPM_PM_MAX_REQUESTS=1000 \
45-
XDEBUG_VERSION=${XDEBUG_VERSION}
45+
XDEBUG_VERSION=${XDEBUG_VERSION} \
46+
TIDEWAYS_APIKEY="" \
47+
TIDEWAYS_AUTO_START=1 \
48+
TIDEWAYS_DAEMON="tcp://tideways-daemon:9135" \
49+
TIDEWAYS_SAMPLERATE=25
4650

4751
RUN apt-get update && \
4852
apt-get -y install --no-install-suggests --no-install-recommends \
@@ -54,6 +58,9 @@ RUN apt-get update && \
5458
gnupg2 \
5559
locales
5660

61+
RUN echo 'deb [signed-by=/usr/share/keyrings/tideways.gpg] https://packages.tideways.com/apt-packages-main any-version main' | tee /etc/apt/sources.list.d/tideways.list && \
62+
curl -L -sS 'https://packages.tideways.com/key.gpg' | gpg --dearmor | tee /usr/share/keyrings/tideways.gpg > /dev/null \
63+
5764
RUN add-apt-repository ppa:ondrej/php -y
5865

5966
RUN apt-get update && \
@@ -77,6 +84,7 @@ RUN apt-get update && \
7784
php${PHP_VERSION}-curl \
7885
php${PHP_VERSION}-fpm \
7986
php${PHP_VERSION}-gd \
87+
php${PHP_VERSION}-http \
8088
php${PHP_VERSION}-igbinary \
8189
php${PHP_VERSION}-imagick \
8290
php${PHP_VERSION}-intl \
@@ -91,6 +99,8 @@ RUN apt-get update && \
9199
php${PHP_VERSION}-xml \
92100
php${PHP_VERSION}-yaml \
93101
php${PHP_VERSION}-zip \
102+
tideways-php \
103+
tideways-cli \
94104
&& apt-get autoremove \
95105
&& find /var/log -type f -name "*.log" -delete \
96106
&& rm -rf /var/lib/apt/lists/* /var/cache/ldconfig/aux-cache \
@@ -115,6 +125,8 @@ RUN ln -s /usr/sbin/php-fpm${PHP_VERSION} /usr/sbin/php-fpm
115125
RUN mkdir -p "/run/php/" \
116126
&& chown -R www-data:www-data /run/php/ \
117127
&& chmod 755 /run/php/ \
128+
&& mkdir -p ${PHP_OPCACHE_FILE_CACHE} \
129+
&& chown -R www-data:www-data ${PHP_OPCACHE_FILE_CACHE} \
118130
&& touch /var/log/xdebug.log \
119131
&& chown www-data:www-data /var/log/xdebug.log
120132

0 commit comments

Comments
 (0)