feat: Alpine flavor

This commit is contained in:
le0m
2023-06-13 12:18:36 +02:00
parent ea2d9bc037
commit 350143ffdd
6 changed files with 81 additions and 17 deletions
+4 -4
View File
@@ -34,11 +34,11 @@ EXTENSIONS := \
xsl \
zip \
sockets
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 latest))
ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 8.0 8.1 8.2 latest alpine))
# Add more extensions to PHP < 7.2.
EXTENSIONS += mcrypt
endif
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 latest))
ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 latest alpine))
# Add more extensions to 5.x series images.
EXTENSIONS += mysql
endif
@@ -53,8 +53,8 @@ test:
echo 'FAIL [Missing image!!!]'; \
exit 1; \
fi
@IMAGE_PHP_VERSION=`docker container run --rm $(REGISTRY)$(IMAGE):$(VERSION) bash -c '/bin/echo $$PHP_VERSION' | cut -d '.' -f 1,2`; \
if [[ "$(PHP_VERSION)" != "latest" && "$${IMAGE_PHP_VERSION}" != "$(PHP_VERSION)" ]]; then \
@IMAGE_PHP_VERSION=`docker container run --rm $(REGISTRY)$(IMAGE):$(VERSION) sh -c '/bin/echo $$PHP_VERSION' | cut -d '.' -f 1,2`; \
if [[ "$(PHP_VERSION)" != "latest" && "$(PHP_VERSION)" != "alpine" && "$${IMAGE_PHP_VERSION}" != "$(PHP_VERSION)" ]]; then \
echo "FAIL [wrong PHP version: expected $(PHP_VERSION), got $${IMAGE_PHP_VERSION}]"; \
exit 1; \
fi