diff --git a/Dockerfile b/Dockerfile index e1d3b0c..63bb742 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,32 +4,43 @@ FROM debian:11.6 LABEL org.opencontainers.image.authors="github@diouxx.be" -#Ne pas poser de question à l'installation +#Ne pas poser de question à l'installation / Don't ask questions during installation ENV DEBIAN_FRONTEND noninteractive -#Installation d'apache et de php7.4 avec extension +#Install pre-requesites RUN apt update \ && apt install --yes --no-install-recommends \ +wget \ +apt-transport-https \ +lsb-release \ +ca-certificates + +#Add Sury repository for PHP 8.1 +RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ +&& sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' + +#Installation d'apache et de php8.1 avec extension / Installation of apache and php8.1 with extensions +RUN apt update \ +&& apt upgrade --yes \ +&& apt install --yes --no-install-recommends \ apache2 \ -php7.4 \ -php7.4-mysql \ -php7.4-ldap \ -php7.4-xmlrpc \ -php7.4-imap \ +php8.1 \ +php8.1-mysql \ +php8.1-ldap \ +php8.1-xmlrpc \ +php8.1-imap \ curl \ -php7.4-curl \ -php7.4-gd \ -php7.4-mbstring \ -php7.4-xml \ -php7.4-apcu-bc \ +php8.1-curl \ +php8.1-gd \ +php8.1-mbstring \ +php8.1-xml \ +# php8.1-apcu-bc \ - no longer supported https://github.com/krakjoe/apcu-bc/issues/34 php-cas \ -php7.4-intl \ -php7.4-zip \ -php7.4-bz2 \ -php7.4-redis \ +php8.1-intl \ +php8.1-zip \ +php8.1-bz2 \ +php8.1-redis \ cron \ -wget \ -ca-certificates \ jq \ libldap-2.4-2 \ libldap-common \ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bff1475 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +DOCKER_TAG = docker-glpi +DOCKER_REVISION ?= testing-$(USER) + +.PHONY: build-image +build-image: + docker build -t ${DOCKER_TAG}:${DOCKER_REVISION} . + +.PHONY: run-image +run-image: + docker run -it --rm -p 8080:80 ${DOCKER_TAG}:${DOCKER_REVISION} + +.PHONY: start-dev +start-dev: build-image run-image \ No newline at end of file diff --git a/glpi-start.sh b/glpi-start.sh index 92063aa..97e8282 100644 --- a/glpi-start.sh +++ b/glpi-start.sh @@ -6,8 +6,8 @@ if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset"; else -echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.4/apache2/conf.d/timezone.ini; -echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.4/cli/conf.d/timezone.ini; +echo "date.timezone = \"$TIMEZONE\"" > /etc/php/8.1/apache2/conf.d/timezone.ini; +echo "date.timezone = \"$TIMEZONE\"" > /etc/php/8.1/cli/conf.d/timezone.ini; fi SRC_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/tags/${VERSION_GLPI} | jq .assets[0].browser_download_url | tr -d \")