Skip to content

Commit 583670e

Browse files
committed
Remove 7.2 version and add 8.1 as default version
1 parent ae10211 commit 583670e

File tree

3 files changed

+37
-30
lines changed

3 files changed

+37
-30
lines changed

Dockerfile

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
ARG version=8.0
1+
ARG version=8.1
22
ARG major=8
3-
ARG composer1_version=1.10.22
4-
ARG composer2_version=2.1.9
5-
ARG blackfire_version=1.68.1
3+
ARG composer1_version=1.10.24
4+
ARG composer2_version=2.1.14
5+
ARG blackfire_version=1.72.0
66
ARG newrelic_version=9.18.1.303
77

8-
FROM minidocks/base:3.9 AS v7.2
9-
108
FROM minidocks/base:3.12 AS v7.3
119

12-
FROM minidocks/base:3.14 AS v7.4
10+
FROM minidocks/base:3.15 AS v7.4
11+
12+
FROM minidocks/base:3.15 AS v8.0
1313

14-
FROM minidocks/base:3.14 AS v8.0
14+
FROM minidocks/base:edge AS v8.1
1515

1616
FROM v$version AS base
1717
LABEL maintainer="Martin Hasoň <martin.hason@gmail.com>"
@@ -22,11 +22,14 @@ ARG major
2222
# 82 is the standard uid/gid for "www-data" in Alpine
2323
RUN getent group www-data >/dev/null || addgroup -g 82 -S www-data; getent passwd www-date >/dev/null || adduser -u 82 -S -s /bin/sh -G www-data www-data
2424

25-
RUN for module in ctype curl iconv json mbstring openssl pcntl pecl-apcu phar posix tokenizer; do modules="$modules php$major-$module"; done \
25+
RUN if [ "$version" = "8.1" ]; then suffix="81"; else suffix="$major"; fi \
26+
&& for module in ctype curl iconv json mbstring openssl pcntl pecl-apcu phar posix tokenizer; do modules="$modules php$suffix-$module"; done \
2627
&& if [ "$version" == "7.2" ]; then libiconv_version="@community"; fi \
27-
&& apk add "gnu-libiconv$libiconv_version" "php$major" $modules && clean \
28-
&& if [ ! -f /usr/bin/php ]; then ln -s "/usr/bin/php$major" /usr/bin/php; fi \
29-
&& if [ ! -f /usr/bin/phar ]; then ln -s "/usr/bin/phar$major" /usr/bin/phar; fi
28+
&& apk add "gnu-libiconv$libiconv_version" "php$suffix" $modules && clean \
29+
&& if [ ! -f /usr/bin/php ]; then ln -s "/usr/bin/php$suffix" /usr/bin/php; fi \
30+
&& if [ ! -f /usr/bin/phar ]; then ln -s "/usr/bin/phar$suffix" /usr/bin/phar; fi \
31+
&& if [ ! -d /etc/php$major ]; then ln -s "/etc/php$suffix" "/etc/php$major"; fi \
32+
&& if [ ! -d /usr/lib/php$major ]; then ln -s "/usr/lib/php$suffix" "/usr/lib/php$major"; fi
3033

3134
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
3235

@@ -63,7 +66,8 @@ FROM base AS latest
6366
ARG version
6467
ARG major
6568

66-
RUN for module in \
69+
RUN if [ "$version" = "8.1" ]; then suffix="81"; else suffix="$major"; fi \
70+
&& for module in \
6771
bcmath \
6872
calendar \
6973
cgi \
@@ -79,7 +83,6 @@ RUN for module in \
7983
mysqli \
8084
mysqlnd \
8185
opcache \
82-
pecl-mcrypt \
8386
pecl-redis \
8487
pecl-xdebug \
8588
pdo_mysql \
@@ -97,9 +100,11 @@ RUN for module in \
97100
xmlwriter \
98101
xsl \
99102
zip \
100-
; do modules="$modules php$major-$module"; done \
101-
&& if [ "$major" != "8" ]; then modules="$modules php$major-xmlrpc"; fi \
102-
&& if [ "$major" == "8" ] || [ "$version" == "7.4" ]; then modules="$modules php$major-ffi"; fi \
103+
; do modules="$modules php$suffix-$module"; done \
104+
&& if [ "$major" != "8" ]; then modules="$modules php$suffix-xmlrpc"; fi \
105+
&& if [ "$major" = "8" ] || [ "$version" = "7.4" ]; then modules="$modules php$suffix-ffi"; fi \
106+
&& if [ "$version" != "7.2" ]; then modules="$modules php$suffix-pecl-uploadprogress"; fi \
107+
&& if [ "$version" != "8.1" ]; then modules="$modules php$suffix-pecl-mcrypt"; fi \
103108
&& apk add $modules \
104109
&& if [ ! -f /usr/bin/php-fpm ]; then ln -s "/usr/sbin/php-fpm$major" /usr/bin/php-fpm; fi \
105110
&& clean
@@ -150,8 +155,10 @@ RUN chmod 1777 /var/lib/nginx/tmp
150155

151156
FROM nginx AS intl
152157

158+
ARG version
153159
ARG major
154160

155-
RUN apk add "php$major-intl" && clean
161+
RUN if [ "$version" = "8.1" ]; then suffix="81"; else suffix="$major"; fi \
162+
&& apk add "php$suffix-intl" && clean
156163

157164
FROM latest

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ docker run --rm -it -v `pwd`:`pwd` -w `pwd` minidocks/php
9696
Tags
9797
----
9898

99-
| Tag | Size |
100-
|-------------|------------------------------------------------------------------------------|
101-
| latest, 8.0 | ![](https://img.shields.io/docker/image-size/minidocks/php/latest?style=flat-square&logo=docker&label=size) |
99+
| Tag | Size |
100+
|-------------|----------------------------------------------------------------------------------------------------------------|
101+
| latest, 8.1 | ![](https://img.shields.io/docker/image-size/minidocks/php/latest?style=flat-square&logo=docker&label=size) |
102+
| 8.1-base | ![](https://img.shields.io/docker/image-size/minidocks/php/8.1-base?style=flat-square&logo=docker&label=size) |
103+
| 8.1 | ![](https://img.shields.io/docker/image-size/minidocks/php/8.1?style=flat-square&logo=docker&label=size) |
104+
| 8.1-nginx | ![](https://img.shields.io/docker/image-size/minidocks/php/8.1-nginx?style=flat-square&logo=docker&label=size) |
105+
| 8.1-intl | ![](https://img.shields.io/docker/image-size/minidocks/php/8.1-intl?style=flat-square&logo=docker&label=size) |
102106
| 8.0-base | ![](https://img.shields.io/docker/image-size/minidocks/php/8.0-base?style=flat-square&logo=docker&label=size) |
103107
| 8.0 | ![](https://img.shields.io/docker/image-size/minidocks/php/8.0?style=flat-square&logo=docker&label=size) |
104108
| 8.0-nginx | ![](https://img.shields.io/docker/image-size/minidocks/php/8.0-nginx?style=flat-square&logo=docker&label=size) |
@@ -111,10 +115,6 @@ Tags
111115
| 7.3 | ![](https://img.shields.io/docker/image-size/minidocks/php/7.3?style=flat-square&logo=docker&label=size) |
112116
| 7.3-nginx | ![](https://img.shields.io/docker/image-size/minidocks/php/7.3-nginx?style=flat-square&logo=docker&label=size) |
113117
| 7.3-intl | ![](https://img.shields.io/docker/image-size/minidocks/php/7.3-intl?style=flat-square&logo=docker&label=size) |
114-
| 7.2-base | ![](https://img.shields.io/docker/image-size/minidocks/php/7.2-base?style=flat-square&logo=docker&label=size) |
115-
| 7.2 | ![](https://img.shields.io/docker/image-size/minidocks/php/7.2?style=flat-square&logo=docker&label=size) |
116-
| 7.2-nginx | ![](https://img.shields.io/docker/image-size/minidocks/php/7.2-nginx?style=flat-square&logo=docker&label=size) |
117-
| 7.2-intl | ![](https://img.shields.io/docker/image-size/minidocks/php/7.2-intl?style=flat-square&logo=docker&label=size) |
118118

119119
See also
120120
--------

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ set -e
33

44
image="${namespace:-minidocks}/php"
55
versions="
6-
7.2;7.2
7-
7.2-base;7.2;base
8-
7.2-nginx;7.2;nginx
9-
7.2-intl;7.2;intl
106
7.3;7.3
117
7.3-base;7.3;base
128
7.3-nginx;7.3;nginx
@@ -19,7 +15,11 @@ versions="
1915
8.0-base;8.0;base
2016
8.0-nginx;8.0;nginx
2117
8.0-intl;8.0;intl
22-
latest;8.0
18+
8.1;8.1
19+
8.1-base;8.1;base
20+
8.1-nginx;8.1;nginx
21+
8.1-intl;8.1;intl
22+
latest;8.1
2323
"
2424

2525
build() {

0 commit comments

Comments
 (0)