dockerRunning GLPI on Docker

circle-info

To get fast, reliable, and secure deployment with none of the work or hidden costs that come with self-hosting, check out GLPI Network Cloudarrow-up-right

GLPI provides an official Docker image and Stack via Dockerhubarrow-up-right that can be used for deployments on any system that runs Docker.

If you need to report an issue.arrow-up-right

GLPI quick start


Use this quick start to run GLPI on its latest version locally. See below for instructions running GLPI in production Assuming you have Docker installed and running, get the latest Docker image:

In order to deploy the GLPI and MySQL Stack hereby, after you install Docker, two files are needed before pulling and running the image.

A docker composearrow-up-right yaml file and an .env file with environment variables used by the docker compose to correctly set up

  • Database host

  • Database host port

  • GLPI Database name

  • GLPI Database User

  • GLPI Database Password

  1. Choose the folder to storage these files

  2. Create a file named docker-compose.yml

  3. Paste the example Docker compose YAML file below

    1. Here's an example docker-compose.yml file for running a stack of the latest stable GLPI version on port 80 with MySQL instance named db and database named glpion port 3306

    2. Volumesarrow-up-right will be created on the same place where the docker compose is

circle-check
  1. Create a file named .env

  2. Paste the env variables below

circle-exclamation
  1. Run the composer

Once the containers are running, you can access GLPI at http://localhost.

circle-check

You can disable this behavior by setting the environment variables below to true in the .env file

  • GLPI_SKIP_AUTOINSTALL=true – GLPI will not automatically install itself, and you need to run the wizard or console commands to install it manually

  • GLPI_SKIP_AUTOUPDATE=true – GLPI will not automatically update itself, and you need to run the wizard or console commands to update it manually

circle-info

If you disable the automatic installation and update, you can use the credentials set in the env file, in order to set up the GLPI instance.

  • GLPI_DB_HOST – Hostname

  • GLPI_DB_NAME – Database

  • GLPI_DB_USER – User

  • GLPI_DB_PASSWORD – Password

Find the Root MySQL Password

circle-info

Please note that we set up a random root password for the MySQL database, so you will need to check the logs of the db container to find it.

Enable Timezones Support

If you want to initialize the timezones supportarrow-up-right for GLPI, we need to first GRANT the glpi user access to mysql.time_zone table.

  1. With the docker container running, run the following command:

circle-info

The root password will be the one you found in the logs of the db container previously.

Don't forget to change the <db_container_id> by the Database Container ID.

  1. Run the following command to initialize the timezones on the GLPI container:

circle-info

Don't forget to change the <glpi_container_id_> by the GLPI Container ID.

Volumes

By default, the glpi/glpi image provides a volume containing its config, marketplace and files directories. For GLPI 10.0.x version, the marketplace directory is not declared in the volume as the path differs. You may want to create a manual volume for the path /var/www/glpi/marketplace if you plan to use it.

Tags

In order for users to have different options for testing and deploying GLPI in different versions, even though the latest versions are always recommended, the GLPI Official Docker Composer allows you to choose between different tagsarrow-up-right containing different versions of GLPI deployment.

GLPI Tags are in the docker compose file, on the line with the image name, where you may change to image: "glpi/glpi:11.0.0-nightly" to install GLPI 11 RC1 on Docker

See more tags here - https://hub.docker.com/r/glpi/glpi/tagsarrow-up-right

Last updated