Skip to content
Snippets Groups Projects
Commit 94379fb4 authored by Robert Lange's avatar Robert Lange
Browse files

refs #24354 [finc] add Dockerfile for php 8.0

* fix xdebug settings
* fix gd library for dynamic covers
* set php version as variable in .env file
** for local development: copy .env.local to .env
** after changing run "docker-compose build php" or "docker-compose up --build --force-recreate" to start immediately

* also refs 23937
parent dcc448ab
No related merge requests found
PHPVERSION=php7_2
\ No newline at end of file
File moved
File moved
# Copyright (C) 2023 Leipzig University Library
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
FROM php:8.0-fpm-alpine
RUN apk add --no-cache $PHPIZE_DEPS freetype-dev libxml2-dev icu-dev libxslt-dev \
&& pecl install xdebug-3.0.0 \
&& docker-php-ext-enable xdebug \
&& docker-php-ext-install mysqli \
&& docker-php-ext-install pdo_mysql \
&& docker-php-ext-install soap \
&& docker-php-ext-install intl \
&& docker-php-ext-install dom \
&& docker-php-ext-install xsl
RUN apk add --no-cache \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
freetype-dev
RUN docker-php-ext-configure gd --with-jpeg --with-webp --with-freetype
RUN docker-php-ext-install gd
COPY php.ini /usr/local/etc/php/conf.d/php.ini
\ No newline at end of file
#!/usr/bin/env sh
# Copyright (C) 2020 Leipzig University Library
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
# @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
until ! (ping -c1 env >/dev/null 2>&1) && [ -f ./data/docker/env/php ]; do :; done
set -a; . ./data/docker/env/php; set +a
: "${UIDGID:=$(stat -c '%u' .):$(stat -c '%g' .)}"
sed -i "s/$(id -u www-data):$(id -g www-data)/$UIDGID/" /etc/passwd
exec docker-php-entrypoint "$@"
; Copyright (C) 2020 Leipzig University Library
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
; @author Sebastian Kehr <kehr@ub.uni-leipzig.de>
; @license https://opensource.org/licenses/GPL-3.0 GNU GPLv3
; See https://www.php.net/manual/en/function.error-reporting.php for more details.
error_reporting = E_ALL
; See https://xdebug.org/docs/all_settings for more details.
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.remote_handler=dbgp
xdebug.discover_client_host=1
xdebug.client_port=9000
short_open_tag=Off;
\ No newline at end of file
......@@ -21,14 +21,14 @@ services:
command: ["install"]
php:
build: devops/docker/php
build: devops/docker/${PHPVERSION:-php7_2}
working_dir: /usr/local/vufind
volumes:
- ./:/usr/local/vufind
depends_on:
- env
- db
entrypoint: ["devops/docker/php/entrypoint.sh"]
entrypoint: devops/docker/${PHPVERSION:-php7_2}/entrypoint.sh
command: ["php-fpm"]
httpd:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment