{"id":22628038,"url":"https://github.com/turgon37/docker-glpi","last_synced_at":"2025-04-11T19:04:14.514Z","repository":{"id":21475672,"uuid":"92597470","full_name":"Turgon37/docker-glpi","owner":"Turgon37","description":"Docker image running GLPI","archived":false,"fork":false,"pushed_at":"2022-01-26T15:10:34.000Z","size":317,"stargazers_count":28,"open_issues_count":10,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T14:51:17.953Z","etag":null,"topics":["docker","glpi"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Turgon37.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T12:30:13.000Z","updated_at":"2023-07-13T12:23:38.000Z","dependencies_parsed_at":"2022-07-27T02:32:14.580Z","dependency_job_id":null,"html_url":"https://github.com/Turgon37/docker-glpi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fdocker-glpi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fdocker-glpi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fdocker-glpi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Turgon37%2Fdocker-glpi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Turgon37","download_url":"https://codeload.github.com/Turgon37/docker-glpi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465325,"owners_count":21108243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","glpi"],"created_at":"2024-12-09T01:17:53.708Z","updated_at":"2025-04-11T19:04:14.477Z","avatar_url":"https://github.com/Turgon37.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker GLPI\n\n[![Build Status](https://travis-ci.com/Turgon37/docker-glpi.svg?branch=master)](https://travis-ci.com/Turgon37/docker-glpi)\n[![](https://images.microbadger.com/badges/image/turgon37/glpi.svg)](https://microbadger.com/images/turgon37/glpi \"Get your own image badge on microbadger.com\")\n[![](https://images.microbadger.com/badges/version/turgon37/glpi.svg)](https://microbadger.com/images/turgon37/glpi \"Get your own version badge on microbadger.com\")\n\nThis images contains an instance of GLPI web application served by nginx and php5-fpm on port 80\n\n:warning: Take care of the [changelogs](CHANGELOG.md) because some breaking changes may happen between versions.\n\n## Supported tags, image variants and respective Dockerfile links\n\n* nginx and PHP7.2 embedded [Dockerfile](https://github.com/Turgon37/docker-glpi/blob/master/Dockerfile_nginx-72)\n\n    * `nginx-72-9.5.5-latest`, `nginx-72-latest`\n    * `nginx-72-9.5.4-latest`, `nginx-72-latest`\n\n## Docker Informations\n\n* This image expose the following ports\n\n| Port           | Usage                |\n| -------------- | -------------------- |\n| 80/tcp         | HTTP web application |\n\n[see https part to known about ssl](#https---ssl-encryption)\n\n * This image takes theses environnements variables as parameters\n\n| Environment                    | Type             | Usage                                                                     |\n| ------------------------------ | ---------------- | ------------------------------------------------------------------------- |\n| TZ                             | String           | Contains the timezone                                                     |\n| GLPI_REMOVE_INSTALLER          | Boolean (yes/no) | Set to yes if it's not the first installation of glpi                     |\n| GLPI_CHMOD_PATHS_FILES         | Boolean (yes/no) | Set to yes to apply chmod/chown on /var/www/files (useful for host mount) |\n| GLPI_INSTALL_PLUGINS           | String           | Comma separated list of plugins to install (see below)                    |\n| PHP_MEMORY_LIMIT               | String           | see PHP memory_limit configuration                                        |\n| PHPFPM_PM                      | String           | see PHPFPM pm configuration                                               |\n| PHPFPM_PM_MAX_CHILDREN         | Integer          | see PHPFPM pm.max_children configuration                                  |\n| PHPFPM_PM_START_SERVERS        | Integer          | see PHPFPM pm.start_servers configuration                                 |\n| PHPFPM_PM_MIN_SPARE_SERVERS    | Integer          | see PHPFPM pm.min_spare_servers configuration                             |\n| PHPFPM_PM_MAX_SPARE_SERVERS    | Integer          | see PHPFPM pm.max_spare_servers configuration                             |\n| PHPFPM_PM_PROCESS_IDLE_TIMEOUT | Mixed            | see PHPFPM pm.process_idle_timeout configuration                          |\n| PHPFPM_PM_MAX_REQUEST          | Integer          | see PHPFPM pm.max_request configuration                                   |\n\nThe GLPI_INSTALL_PLUGINS variable must contains the list of plugins to install (download and extract) before starting glpi.\nThis environment variable is a comma separated list of plugins definitions. Each plugin definition must be like this \"PLUGINNAME|URL\".\nThe PLUGINNAME is the name of the first folder in plugin archive and will be the glpi's name of the plugin.\nThe URL is the full URL from which to download the plugin. This url can contains some compressed file extensions, in some case the installer script will not be able to extract it, so you can create an issue with specifying the unhandled file extension.\nThese two items are separated by a pipe symbol.\n\nTo summarize, the GLPI_INSTALL_PLUGINS variable must follow the following skeleton GLPI_INSTALL_PLUGINS=\"name1|url1,name2|url2\"\nFor better example see at the end of this file.\n\n   * The following volumes are exposed by this image\n\n| Volume             | Usage                                            |\n| ------------------ | ------------------------------------------------ |\n| /var/www/files     | The data path of GLPI                            |\n| /var/www/config    | The configuration path of GLPI                   |\n\n\n## Application Informations\n\n\n### HTTPS - SSL encryption\n\nThere are many different possibilities to introduce encryption depending on your setup.\n\nAs most of available docker image on the internet, I recommend using a reverse proxy in front of this image.\nThis prevent me to introduce all ssl configurations parameters and also to prevent a limitation of the available parameters.\n\nFor example, you can use the popular nginx-proxy and docker-letsencrypt-nginx-proxy-companion containers or Traefik to handle this.\n\n\n### GLPI Cronjob\n\nGLPI require a job to be run periodically. Starting from 3.0.0 release, this image does not provide any solution to handle this. I've choose to remove cron task from this image to respect docker convention and to prevent a clustered deploiement to run the cron on all cluster instances.\n\nAs compensation I provide a wrapper script that wrap the batch execution and return a json object with job execution details at ```/opt/scripts/cronwrapper.py```\n\nTo ensure correct GLPI running please put this job in your common cron scheduler.\nOn linux you can use the /etc/crontab file with a content similar to this one :\n\n```\n*/15 * * * * root docker ps | grep --quiet 'glpi' \u0026\u0026 docker exec --user www-data glpi /opt/scripts/cronwrapper.py --forward-stderr\n```\n\n\n### Timezone issues\n\nTimezone is handled at PHP level in the image since 2.4.2 version, but you might encounter issues if you use different timezone in your database engine.\nPlease refer to the GLPI documentations to handle this at database level https://glpi-install.readthedocs.io/en/develop/timezones.html.\n\n\n## Todo\n\n* Normalize log output\n* Propose splitted nginx/fpm images\n* Add prometheus exporter (https://github.com/vozlt/nginx-module-vts, https://github.com/bakins/php-fpm-exporter)\n\n## Installation\n\n```\ndocker pull turgon37/glpi:nginx-72-latest\n```\n\n\n## Usage\n\nThe first time you run this image, set the GLPI_REMOVE_INSTALLER variable to 'no', then after this first installation set it to 'yes' to remove the installer.\n\n### Without database link (you can use an ip address or a domain name in the installer gui)\n\n```\ndocker run --name glpi --publish 8000:80 --volume data-glpi:/var/www/files --volume data-glpi-config:/var/www/config turgon37/glpi:nginx-56-latest\n```\n\n### With database link (if you have any MySQL/MariaDB as a docker container)\n\n#### Create dedicated network\n\n```\ndocker network create glpi-network\n```\n\n#### Start a MySQL instance\n\n```\ndocker run --name mysql -d --net glpi-network -e MYSQL_DATABASE=glpi -e MYSQL_USER=glpi -e MYSQL_PASSWORD=glpi -e MYSQL_ROOT_PASSWORD=root_password mysql\n```\n\n#### Start a GLPI instance\n\n```\ndocker run --name glpi --publish 8000:80 --volume data-glpi:/var/www/files --volume data-glpi-config:/var/www/config --net glpi-network turgon37/glpi:nginx-56-latest\n```\n\n### Docker-compose Specific configuration examples\n\n* Production configuration with already installed GLPI with FusionInventory and dashboard plugin :\n\n```\nversion: '2.1'\nservices:\n\n  glpi:\n    image: turgon37/glpi:nginx-72-latest\n    environment:\n      GLPI_REMOVE_INSTALLER: 'no'\n      GLPI_INSTALL_PLUGINS: \"\n        fusioninventory|https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/glpi9.4%2B2.4/fusioninventory-9.4+2.4.tar.bz2,\\\n        dumpentity|https://forge.glpi-project.org/attachments/download/2089/glpi-dumpentity-1.4.0.tar.gz\\\n        \"\n    ports:\n      - 127.0.0.1:8008:80\n    volumes:\n      - data-glpi-files:/var/www/files\n      - data-glpi-config:/var/www/config\n    depends_on:\n      mysqldb:\n        condition: service_healthy\n    restart: always\n    networks:\n      glpi-network:\n        aliases:\n          - glpi\n\n  mysqldb:\n    image: mysql\n    healthcheck:\n      test: [\"CMD\", \"mysqladmin\" ,\"ping\", \"-h\", \"localhost\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n    restart: always\n    command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8\n    environment:\n      MYSQL_ROOT_PASSWORD: root\n    volumes:\n      - mysql-glpi-db:/var/lib/mysql\n    restart: always\n    networks:\n      glpi-network:\n        aliases:\n          - mysqldb\n\nnetworks:\n  glpi-network:\n    driver: bridge\n\nvolumes:\n  data-glpi-files:\n  data-glpi-config:\n  mysql-glpi-db:\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturgon37%2Fdocker-glpi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fturgon37%2Fdocker-glpi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fturgon37%2Fdocker-glpi/lists"}