From c76c67aa83b4e76c51198ad9bba1f4827b87cb1d Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 29 Sep 2022 11:30:39 +0200 Subject: [PATCH] Add Icinga-stuff to PHP include path so that non-Icinga-stuff, e.g. PHPUnit, can reach Icinga-stuff. --- Dockerfile | 1 + action.Dockerfile | 2 +- action.bash | 2 +- build.bash | 2 +- php.ini | 2 ++ 5 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 php.ini diff --git a/Dockerfile b/Dockerfile index 1b64752..28e31ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,7 @@ ENTRYPOINT ["/entrypoint"] COPY icingaweb2 /usr/share/icingaweb2 COPY icinga-php /usr/share/icinga-php +COPY php.ini /etc/php/7.4/cli/conf.d/99-docker.ini RUN ["ln", "-vs", "/usr/share/icingaweb2/packages/files/apache/icingaweb2.conf", "/etc/apache2/conf-enabled/"] RUN ["ln", "-vs", "/usr/share/icingaweb2/bin/icingacli", "/usr/local/bin/"] diff --git a/action.Dockerfile b/action.Dockerfile index 5b42f43..50a43e2 100644 --- a/action.Dockerfile +++ b/action.Dockerfile @@ -33,7 +33,7 @@ RUN apt-get update ;\ COPY --from=clone /actions /actions -COPY action.bash composer.bash Dockerfile get-mods.sh icingaweb2.patch / +COPY action.bash composer.bash Dockerfile get-mods.sh icingaweb2.patch php.ini / COPY entrypoint /entrypoint CMD ["/action.bash"] diff --git a/action.bash b/action.bash index 96d91a9..719ffa2 100755 --- a/action.bash +++ b/action.bash @@ -16,7 +16,7 @@ mkimg () { /composer.bash patch -d icingaweb2 -p0 < /icingaweb2.patch - cp -r /entrypoint . + cp -r /entrypoint /php.ini . docker build -f /Dockerfile -t "${TARGET}:$TAG" . STATE_isPost=1 node /actions/checkout/dist/index.js diff --git a/build.bash b/build.bash index 5b72e79..c61bbfa 100755 --- a/build.bash +++ b/build.bash @@ -33,6 +33,6 @@ cd /iw2cp /bldctx/composer.bash patch -d icingaweb2 -p0 < /bldctx/icingaweb2.patch -cp -r /entrypoint . +cp -r /entrypoint /bldctx/php.ini . docker build -f /bldctx/Dockerfile -t icinga/icingaweb2 . EOF diff --git a/php.ini b/php.ini new file mode 100644 index 0000000..08b4cb2 --- /dev/null +++ b/php.ini @@ -0,0 +1,2 @@ +[PHP] +include_path = ".:/usr/share/php:/usr/share/icingaweb2/library:/usr/share/icingaweb2/library/vendor"