Skip to content

Commit 1d4b0f1

Browse files
Merge pull request #6 from developeregrem/php-ext
switched to better php ext installation process
2 parents e804963 + db33cbf commit 1d4b0f1

File tree

2 files changed

+7
-22
lines changed

2 files changed

+7
-22
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313

1414
build:
1515

16-
runs-on: ubuntu-latest
16+
#runs-on: ubuntu-latest
17+
runs-on: ubuntu-22.04
1718

1819
steps:
1920
- uses: actions/checkout@v3

Dockerfile

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,22 @@
11
# docker-compose build
22
FROM php:8.4-fpm-alpine
33

4-
ENV PHPREDIS_VERSION 6.1.0
54
ENV FEWOHBEE_VERSION latest
65

7-
RUN mkdir -p /usr/src/php/ext/redis \
8-
&& curl -L https://github.com/phpredis/phpredis/archive/$PHPREDIS_VERSION.tar.gz | tar xvz -C /usr/src/php/ext/redis --strip 1 \
9-
&& echo 'redis' >> /usr/src/php-available-exts
10-
6+
ARG PHP_EXTS="redis intl gd opcache pdo_mysql"
7+
8+
ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
9+
1110
RUN apk add --update --no-cache \
1211
git \
1312
zip \
1413
unzip \
1514
tzdata \
16-
freetype \
17-
libjpeg-turbo \
18-
libpng \
19-
libxml2 \
2015
icu \
2116
# required for full langugae support: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.16.0#ICU_data_split
2217
icu-data-full
2318

24-
RUN apk add --no-cache --virtual .build-deps \
25-
autoconf \
26-
freetype-dev \
27-
libjpeg-turbo-dev \
28-
libpng-dev \
29-
libxml2-dev \
30-
icu-dev \
31-
pcre-dev \
32-
&& docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \
33-
&& docker-php-ext-install -j$(nproc) gd \
34-
&& docker-php-ext-install intl pdo_mysql xml opcache redis \
35-
&& apk del .build-deps
19+
RUN install-php-extensions ${PHP_EXTS}
3620

3721
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
3822

0 commit comments

Comments
 (0)