from:php image: allow apt install of php-embed
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Mauro Torrez 2019-09-22 19:11:16 -03:00
parent c598b86f5b
commit dfc2d2f63b
2 changed files with 28 additions and 0 deletions

View File

@ -65,6 +65,7 @@ Dockerfile.php7.3: unit/version
-e 's,@@UNITPACKAGES@@,$(MODULE_php7.3),g' \ -e 's,@@UNITPACKAGES@@,$(MODULE_php7.3),g' \
-e 's,@@UNIT_VERSION@@,$(UNIT_VERSION),g' \ -e 's,@@UNIT_VERSION@@,$(UNIT_VERSION),g' \
> Dockerfile.php7.3 > Dockerfile.php7.3
patch Dockerfile.php7.3 patch-Dockerfile.php7.3
build-%: Dockerfile.% build-%: Dockerfile.%
docker build -t unit:$(VERSION)-$* -f Dockerfile.$* . docker build -t unit:$(VERSION)-$* -f Dockerfile.$* .

27
patch-Dockerfile.php7.3 Normal file
View File

@ -0,0 +1,27 @@
diff --git a/pkg/docker/Dockerfile.tmpl b/pkg/docker/Dockerfile.tmpl
index 18d6d34..5fa7ad6 100644
--- a/pkg/docker/Dockerfile.tmpl
+++ b/pkg/docker/Dockerfile.tmpl
@@ -4,6 +4,14 @@ LABEL maintainer="NGINX Docker Maintainers <docker-maint@nginx.com>"
ENV UNIT_VERSION @@UNIT_VERSION@@
+# php-embed package is a dependency of unit-php
+RUN set -eux; \
+ { \
+ echo 'Package: php-embed php-common php-composer-ca-bundle php-curl php-mbstring php7.3-curl php7.3-mbstring php7.3-common'; \
+ echo 'Pin: release n=buster'; \
+ echo 'Pin-Priority: 1000'; \
+ } > /etc/apt/preferences.d/00-debian-php-embed
+
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y gnupg1 apt-transport-https ca-certificates \
@@ -74,6 +82,7 @@ RUN set -x \
$unitPackages \
curl \
&& apt-get remove --purge --auto-remove -y apt-transport-https && rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/unit.list \
+ && ln -sf /usr/share/php/Embed /usr/local/lib/php/Embed
\
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
&& if [ -n "$tempDir" ]; then \