From b4657547c6cc5a588261bc09d4f95eef37950df3 Mon Sep 17 00:00:00 2001 From: Aiden Arnkels-Webb Date: Tue, 18 Apr 2023 17:05:46 +0100 Subject: [PATCH 1/4] Add Makefile for quick dev --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..25deeeb --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +DOCKER_REVISION ?= testing-$(USER) + +.PHONY: build-image +build-image: + docker build -t glpi:${DOCKER_REVISION} . + +.PHONY: run-image +run-image: + docker run -it --rm -p 8080:80 glpi:${DOCKER_REVISION} + +.PHONY: start-dev +start-dev: build-image run-image \ No newline at end of file From ca265ed0d53ae53157b229afb16477109dfec24f Mon Sep 17 00:00:00 2001 From: Aiden Arnkels-Webb Date: Tue, 18 Apr 2023 17:06:47 +0100 Subject: [PATCH 2/4] Get tag from Var --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 25deeeb..bff1475 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ +DOCKER_TAG = docker-glpi DOCKER_REVISION ?= testing-$(USER) .PHONY: build-image build-image: - docker build -t glpi:${DOCKER_REVISION} . + docker build -t ${DOCKER_TAG}:${DOCKER_REVISION} . .PHONY: run-image run-image: - docker run -it --rm -p 8080:80 glpi:${DOCKER_REVISION} + 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 From 52b03a0e8b0ee33fdc594d348df4dd2bc1277aa3 Mon Sep 17 00:00:00 2001 From: Aiden Arnkels-Webb Date: Tue, 18 Apr 2023 17:28:17 +0100 Subject: [PATCH 3/4] Update glpi-start --- glpi-start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 \") From 03e6696880eb0c1b760f1ce0b598522fd5e2f835 Mon Sep 17 00:00:00 2001 From: Aiden Arnkels-Webb Date: Tue, 18 Apr 2023 17:28:30 +0100 Subject: [PATCH 4/4] Update Dockerfile --- Dockerfile | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) 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 \