Author SHA1 Message Date
DiouxX d3852d4f6b Revert "Extend the GLPI installed check" 2022-03-07 15:30:00 +01:00
DiouxX b9510bcaa5 Merge pull request #51 from monstermichl/master
Extend the GLPI installed check
2022-03-06 20:32:08 +01:00
DiouxX e9f73a6605 Merge pull request #52 from Toumash/feature/readme-default-credentials
add default accounts to the readme
2022-03-06 20:26:28 +01:00
Tomasz Dłuski 5eecfdaa37 add default accounts to the readme 2022-02-23 20:31:17 +01:00
monstermichl 5999b1641c Extend the GLPI installed check
Extending the GLPI installed check by making sure that not only the plugins folder is present. This way it is possible to install plugins before GLPI is started which makes it easier to build custom Docker images based on diouxx/glpi.
2022-02-18 08:17:27 +01:00
DiouxX 26b611dbb3 Merge pull request #47 from Tchello-Slackware/master
Update docker-compose.yml to correct misspelling
2022-01-29 07:40:06 +01:00
marcelorosa c76cef5961 Update docker-compose.yml 2022-01-26 09:52:48 -03:00
DiouxX 149b46e7a8 Move ldap dependances to Dockerfile 2021-12-28 09:07:14 +01:00
DiouxX 6a55753f85 Add a deployment of specific version wih docker-compose 2021-12-28 08:52:35 +01:00
DiouxX a0026fb9fa Update docker-compose file with mariadb 2021-12-26 11:04:58 +01:00
DiouxX c765097e12 Update Readme from mysql to mariadb 2021-12-14 20:44:41 +01:00
DiouxX cd34b15ae1 Replace deprecated MAINTAINER label 2021-12-13 09:27:16 +01:00
DiouxX 77f7fbb654 LDAP bug fix after upgarde to Debian 11 2021-12-13 09:24:33 +01:00
DiouxX d1d09adf30 Change the timezone files location to PHP7.4 2021-12-12 21:10:52 +01:00
DiouxX 7f71b6d621 Upgrade to Debian 11.1 and CVE-2021-40438 fix 2021-12-12 20:52:17 +01:00
DiouxX 3c9568c0ac Merge pull request #37 from psychoz971/master
Add Timezone support for php CLI
2021-08-05 08:09:33 +02:00
Laurent Vergerolle - IPEOS 41e43abf74 Add Timezone support for php CLI 2021-08-03 15:22:58 -04:00
DiouxX 4a32ee01ac Update mysql version 2021-07-11 11:15:35 +02:00
DiouxX dd0be24762 Merge pull request #30 from petersonbasso/update_dockerfile
Updating the dockerfile with some dependencies
2020-07-07 16:24:34 +02:00
Peterson Basso 2423b31052 update dockerfile with php extensions 2020-07-07 11:03:35 -03:00
DiouxX d9faa67a9f Reduce size with --no-install-recommends 2020-07-07 13:24:58 +02:00
DiouxX 9a94c82205 Fix Debian and PHP version 2020-07-06 16:04:57 +02:00
DiouxX 388dcf69a8 Add microbadge to readme 2019-10-02 22:28:59 +02:00
DiouxX 301356f819 Update README 2019-04-16 21:29:33 +02:00
DiouxX 438f401488 spelling error 2019-03-01 10:06:07 +01:00
DiouxX 687c0e28f1 Add docker-compose without persistance data to quickly test 2019-03-01 10:01:28 +01:00
DiouxX ec20aeb40e Update docker-compose section on README 2019-03-01 09:49:52 +01:00
DiouxX f7a9c4e92f Update Dpeloy GLPI persistance data section on README 2019-03-01 09:44:42 +01:00
DiouxX 6d3e390022 Update Deploy GLPI without database section on README 2019-03-01 09:30:01 +01:00
DiouxX 89427a845c modify docker-compose to remove obsolet links line 2019-03-01 09:13:07 +01:00
4 changed files with 183 additions and 56 deletions

No files matched your search

+26 -16
View File
@@ -1,31 +1,41 @@
#On choisit une debian
FROM debian:latest
FROM debian:11.1
LABEL org.opencontainers.image.authors="github@diouxx.be"
MAINTAINER DiouxX "github@diouxx.be"
#Ne pas poser de question à l'installation
ENV DEBIAN_FRONTEND noninteractive
#Installation d'apache et de php5 avec extension
#Installation d'apache et de php7.4 avec extension
RUN apt update \
&& apt -y upgrade \
&& apt -y install \
&& apt install --yes --no-install-recommends \
apache2 \
php \
php-mysql \
php-ldap \
php-xmlrpc \
php-imap \
php7.4 \
php7.4-mysql \
php7.4-ldap \
php7.4-xmlrpc \
php7.4-imap \
curl \
php-curl \
php-gd \
php-mbstring \
php-xml \
php-apcu-bc \
php7.4-curl \
php7.4-gd \
php7.4-mbstring \
php7.4-xml \
php7.4-apcu-bc \
php-cas \
php7.4-intl \
php7.4-zip \
php7.4-bz2 \
cron \
wget \
jq
ca-certificates \
jq \
libldap-2.4-2 \
libldap-common \
libsasl2-2 \
libsasl2-modules \
libsasl2-modules-db \
&& rm -rf /var/lib/apt/lists/*
#Copie et execution du script pour l'installation et l'initialisation de GLPI
COPY glpi-start.sh /opt/
+144 -28
View File
@@ -1,70 +1,186 @@
# Project to deploy GLPI with docker
[![](https://images.microbadger.com/badges/version/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own image badge on microbadger.com")
![Docker Pulls](https://img.shields.io/docker/pulls/diouxx/glpi) ![Docker Stars](https://img.shields.io/docker/stars/diouxx/glpi) [![](https://images.microbadger.com/badges/image/diouxx/glpi.svg)](http://microbadger.com/images/diouxx/glpi "Get your own image badge on microbadger.com") ![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/diouxx/glpi)
# Table of Contents
1. [Introduction](#introduction)
2. [Deploy CLI](#deploy-with-CLI)
- [Deploy GLPI without database](#deploy-glpi-without-database)
- [Deploy GLPI with existing database](#deploy-glpi-with-existing-database)
- [Deploy GLPI with database and persistance container data](#deploy-glpi-with-database-and-persistance-container-data)
- [Deploy a specific release of GLPI](#deploy-a-specific-release-of-glpi)
3. [Deploy docker-compose](#deploy-with-docker-compose)
4. [Environnment variables](#environnment-variables)
- [Timezone](#timezone)
- [Project to deploy GLPI with docker](#project-to-deploy-glpi-with-docker)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Default accounts](#default-accounts)
- [Deploy with CLI](#deploy-with-cli)
- [Deploy GLPI](#deploy-glpi)
- [Deploy GLPI with existing database](#deploy-glpi-with-existing-database)
- [Deploy GLPI with database and persistence data](#deploy-glpi-with-database-and-persistence-data)
- [Deploy a specific release of GLPI](#deploy-a-specific-release-of-glpi)
- [Deploy with docker-compose](#deploy-with-docker-compose)
- [Deploy without persistence data ( for quickly test )](#deploy-without-persistence-data--for-quickly-test-)
- [Deploy a specific release](#deploy-a-specific-release)
- [Deploy with persistence data](#deploy-with-persistence-data)
- [mariadb.env](#mariadbenv)
- [docker-compose .yml](#docker-compose-yml)
- [Environnment variables](#environnment-variables)
- [TIMEZONE](#timezone)
# Introduction
Install and run an GLPI instance with docker.
Install and run an GLPI instance with docker
## Default accounts
More info in the 📄[Docs](https://glpi-install.readthedocs.io/en/latest/install/wizard.html#end-of-installation)
| Login/Password | Role |
|-------------------- |------------------- |
| glpi/glpi | admin account |
| tech/tech | technical account |
| normal/normal | "normal" account |
| post-only/postonly | post-only account |
# Deploy with CLI
## Deploy GLPI without database
## Deploy GLPI
```sh
docker run --name glpi -p 80:80 -d diouxx/glpi
docker run --name mariadb -e MARIADB_ROOT_PASSWORD=diouxx -e MARIADB_DATABASE=glpidb -e MARIADB_USER=glpi_user -e MARIADB_PASSWORD=glpi -d mariadb:10.7
docker run --name glpi --link mariadb:mariadb -p 80:80 -d diouxx/glpi
```
## Deploy GLPI with existing database
```sh
docker run --name glpi --link yourdatabase:mysql -p 80:80 -d diouxx/glpi
docker run --name glpi --link yourdatabase:mariadb -p 80:80 -d diouxx/glpi
```
## Deploy GLPI with database and persistance container data
## Deploy GLPI with database and persistence data
For an usage on production environnement or daily usage, it's recommanded to use a data container for persistent data.
For an usage on production environnement or daily usage, it's recommanded to use container with volumes to persistent data.
* First, create data container
* First, create MariaDB container with volume
```sh
docker create --name glpi-data --volume /var/www/html/glpi:/var/www/html/glpi busybox /bin/true
docker run --name mariadb -e MARIADB_ROOT_PASSWORD=diouxx -e MARIADB_DATABASE=glpidb -e MARIADB_USER=glpi_user -e MARIADB_PASSWORD=glpi --volume /var/lib/mysql:/var/lib/mysql -d mariadb:10.7
```
* Then, you link your data container with GLPI container
* Then, create GLPI container with volume and link MariaDB container
```sh
docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 -d diouxx/glpi
docker run --name glpi --link mariadb:mariadb --volume /var/www/html/glpi:/var/www/html/glpi -p 80:80 -d diouxx/glpi
```
Enjoy :)
## Deploy a specific release of GLPI
Default, docker run will use the latest release of GLPI.
For an usage on production environnement, it's recommanded to use the latest release.
For an usage on production environnement, it's recommanded to set specific release.
Here an example for release 9.1.6 :
```sh
docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 --env "VERSION_GLPI=9.1.6" -d diouxx/glpi
docker run --name glpi --hostname glpi --link mariadb:mariadb --volume /var/www/html/glpi:/var/www/html/glpi -p 80:80 --env "VERSION_GLPI=9.1.6" -d diouxx/glpi
```
# Deploy with docker-compose
To deploy with docker compose, you use *docker-compose.yml* and *mysql.env* file.
You can modify **_mysql.env_** to personalize settings like :
## Deploy without persistence data ( for quickly test )
```yaml
version: "3.8"
* MySQL root password
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
environment:
- MARIADB_ROOT_PASSWORD=password
- MARIADB_DATABASE=glpidb
- MARIADB_USER=glpi_user
- MARIADB_PASSWORD=glpi
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
```
## Deploy a specific release
```yaml
version: "3.8"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
environment:
- MARIADB_ROOT_PASSWORD=password
- MARIADB_DATABASE=glpidb
- MARIADB_USER=glpi_user
- MARIADB_PASSWORD=glpi
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
environment:
- VERSION_GLPI=9.5.6
ports:
- "80:80"
```
## Deploy with persistence data
To deploy with docker compose, you use *docker-compose.yml* and *mariadb.env* file.
You can modify **_mariadb.env_** to personalize settings like :
* MariaDB root password
* GLPI database
* GLPI user database
* GLPI user password
### mariadb.env
```
MARIADB_ROOT_PASSWORD=diouxx
MARIADB_DATABASE=glpidb
MARIADB_USER=glpi_user
MARIADB_PASSWORD=glpi
```
### docker-compose .yml
```yaml
version: "3.2"
services:
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
volumes:
- /var/lib/mysql:/var/lib/mysql
env_file:
- ./mariadb.env
restart: always
#GLPI Container
glpi:
image: diouxx/glpi
container_name : glpi
hostname: glpi
ports:
- "80:80"
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=Europe/Brussels
restart: always
```
To deploy, just run the following command on the same directory as files
```sh
@@ -78,13 +194,13 @@ If you need to set timezone for Apache and PHP
From commande line
```sh
docker run --name glpi --hostname glpi --link mysql:mysql --volumes-from glpi-data -p 80:80 --env "TIMEZONE=Europe/Brussels" -d diouxx/glpi
docker run --name glpi --hostname glpi --link mariadb:mariadb --volumes-from glpi-data -p 80:80 --env "TIMEZONE=Europe/Brussels" -d diouxx/glpi
```
From docker-compose
Modify this settings
```yml
```yaml
environment:
TIMEZONE=Europe/Brussels
```
```
+9 -10
View File
@@ -1,15 +1,16 @@
version: "3"
version: "3.2"
services:
#Mysql Container
mysql:
image: mysql:5.7.23
container_name: mysql
hostname: mysql
#MariaDB Container
mariadb:
image: mariadb:10.7
container_name: mariadb
hostname: mariadb
volumes:
- /var/lib/mysql:/var/lib/mysql
env_file:
- ./mysql.env
- ./mariadb.env
restart: always
#GLPI Container
glpi:
@@ -18,12 +19,10 @@ services:
hostname: glpi
ports:
- "80:80"
links:
- mysql:mysql
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/www/html/glpi/:/var/www/html/glpi
environment:
- TIMEZONE=Europe/Brussels
restart: always
restart: always
+4 -2
View File
@@ -5,7 +5,9 @@
&& VERSION_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest | grep tag_name | cut -d '"' -f 4)
if [[ -z "${TIMEZONE}" ]]; then echo "TIMEZONE is unset";
else echo "date.timezone = \"$TIMEZONE\"" > /etc/php/7.0/apache2/conf.d/timezone.ini;
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;
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 \")
@@ -17,7 +19,7 @@ FOLDER_WEB=/var/www/html/
if !(grep -q "TLS_REQCERT" /etc/ldap/ldap.conf)
then
echo "TLS_REQCERT isn't present"
echo -e "TLS_REQCERT\tnever" >> /etc/ldap/ldap.conf
echo -e "TLS_REQCERT\tnever" >> /etc/ldap/ldap.conf
fi
#Téléchargement et extraction des sources de GLPI