Skip to content

Commit d41032d

Browse files
committed
feat: add new tags
1 parent 7b61772 commit d41032d

File tree

3 files changed

+163
-6
lines changed

3 files changed

+163
-6
lines changed

fpm-alpine/8.2/dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:8.2.18-fpm-alpine3.19
1+
FROM php:8.2.20-fpm-alpine3.20
22

33
# Set the maintainer label
44
LABEL Maintainer="Kazem Mirzaei <[email protected]>"

fpm-alpine/8.3/dockerfile

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
FROM php:8.3.9-alpine3.20
2+
3+
# Set the maintainer label
4+
LABEL Maintainer="Kazem Mirzaei <[email protected]>"
5+
LABEL Description="PHP-FPM v8.2 with essential extensions on top of Alpine Linux."
6+
7+
# Set environment variables for the user and group
8+
ENV USER www
9+
ENV GROUP www
10+
11+
# Switch to root user to perform system updates and installations
12+
USER root
13+
14+
15+
#############################################
16+
### Install and enable PHP extensions
17+
#############################################
18+
19+
# Install system dependencies
20+
RUN set -ex \
21+
&& apk add --update --no-cache \
22+
c-client \
23+
freetype \
24+
ffmpeg \
25+
gettext \
26+
gmp \
27+
icu-libs \
28+
imagemagick \
29+
imap \
30+
libintl \
31+
libjpeg-turbo \
32+
libpng \
33+
libpq \
34+
libtool \
35+
libxpm \
36+
libxslt \
37+
libzip \
38+
make \
39+
mysql-client \
40+
tzdata
41+
42+
# Development dependencies
43+
RUN set -ex \
44+
&& apk add --update --no-cache \
45+
autoconf \
46+
curl-dev \
47+
freetype-dev \
48+
g++ \
49+
gcc \
50+
gettext-dev \
51+
git \
52+
gmp-dev \
53+
icu-dev \
54+
imagemagick-dev \
55+
imap-dev \
56+
krb5-dev \
57+
libc-dev \
58+
libjpeg-turbo-dev \
59+
libpng-dev \
60+
libwebp-dev \
61+
libxml2-dev \
62+
libxpm-dev \
63+
libxslt-dev \
64+
libzip-dev \
65+
pcre-dev \
66+
pkgconf \
67+
zlib-dev \
68+
\
69+
################################
70+
# Install PHP extensions
71+
################################
72+
\
73+
# Install gd
74+
&& ln -s /usr/lib/$(apk --print-arch)-linux-gnu/libXpm.* /usr/lib/ \
75+
&& docker-php-ext-configure gd \
76+
--enable-gd \
77+
--with-webp \
78+
--with-jpeg \
79+
--with-xpm \
80+
--with-freetype \
81+
--enable-gd-jis-conv \
82+
&& docker-php-ext-install -j$(nproc) gd \
83+
&& true \
84+
\
85+
# Install gettext
86+
&& docker-php-ext-install -j$(nproc) gettext \
87+
&& true \
88+
\
89+
# Install gmp
90+
&& docker-php-ext-install -j$(nproc) gmp \
91+
&& true \
92+
\
93+
# Install bcmath
94+
&& docker-php-ext-install -j$(nproc) bcmath \
95+
&& true \
96+
\
97+
# Install exif
98+
&& docker-php-ext-install -j$(nproc) exif \
99+
&& true \
100+
\
101+
# Install imap
102+
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl --with-imap \
103+
&& docker-php-ext-install -j$(nproc) imap \
104+
&& true \
105+
\
106+
# Install imagick
107+
&& pecl install imagick \
108+
&& docker-php-ext-enable imagick \
109+
&& true \
110+
\
111+
# Install intl
112+
&& docker-php-ext-install -j$(nproc) intl \
113+
&& true \
114+
\
115+
# Install pdo_mysql
116+
&& docker-php-ext-configure pdo_mysql --with-zlib-dir=/usr \
117+
&& docker-php-ext-install -j$(nproc) pdo pdo_mysql \
118+
&& true \
119+
\
120+
# Install pcntl
121+
&& docker-php-ext-install -j$(nproc) pcntl \
122+
&& true \
123+
\
124+
# Install redis
125+
&& pecl install --force redis \
126+
&& docker-php-ext-enable redis \
127+
&& true \
128+
\
129+
# Install zip
130+
&& docker-php-ext-configure zip --with-zip \
131+
&& docker-php-ext-install -j$(nproc) zip \
132+
&& true \
133+
\
134+
# Clean up build packages
135+
&& docker-php-source delete \
136+
&& rm -fr /tmp/pear \
137+
&& rm -rf /var/cache/apk/* \
138+
&& true
139+
140+
# Install Composer
141+
RUN wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet \
142+
&& mv composer.phar /usr/local/bin/composer \
143+
&& addgroup -S composer \
144+
&& adduser -S composer -G composer \
145+
&& composer --version \
146+
&& true
147+
148+
149+
# Start PHP-FPM
150+
EXPOSE 9000
151+
CMD ["php-fpm"]

makefile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
# Image URL to use all building/pushing image targets
22
REGISTRY ?= k90mirzaei/php
3-
VERSION ?= 8.2.18-fpm-alpine3.19
3+
VERSION ?= latest
44

55
all: build push
66

77
build: ## Build all images
88
- @echo "Building..."
9-
- docker build ./fpm-alpine/8.1 -t $(REGISTRY):$(VERSION)
10-
- docker build ./fpm-alpine/8.2 -t $(REGISTRY):$(VERSION)
9+
- @for dir in $(shell find ./fpm-alpine -mindepth 1 -maxdepth 1 -type d); do \
10+
version=$$(basename $$dir); \
11+
echo "Building image for version $$version..."; \
12+
docker build $$dir -t $(REGISTRY):$$version-$(VERSION); \
13+
done
1114

1215
push: ## Push all images to github repo
1316
- @echo "Pushing..."
14-
- docker push $(REGISTRY):$(VERSION)
15-
- docker push $(REGISTRY):$(VERSION)
17+
- @for dir in $(shell find ./fpm-alpine -mindepth 1 -maxdepth 1 -type d); do \
18+
version=$$(basename $$dir); \
19+
echo "Pushing image for version $$version..."; \
20+
docker push $(REGISTRY):$$version-$(VERSION); \
21+
done
1622

1723

1824
help: ## Show makefile helper

0 commit comments

Comments
 (0)