+
Skip to content

jantman/docker-glpi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jantman fork of jr0w3/docker-glpi

This is a fork of https://github.com/jr0w3/docker-glpi with the following major changes:

  • Image is now predictable/repeatable; all software is downloaded and installed during the Docker build, in accordance with Docker development best practices, Best practices for writing Dockerfiles, and The Twelve-Factor App/. Restarting the container, or even recreating the container from the same tag, will not result in any changes to the running software.
  • GLPI 10.0.9, latest version
  • Volumes for config, data, and logs
  • Apache configured for proper root directory
  • GLPI src/Inventory/Inventory.php patched for some Docker modifications, namely:
    • Docker containers (virtualmachines) have their image field (discarded by GLPI) copied to the comment field (kept by GLPI)
    • Images for running Docker containers are also reported in the Software category, with the "publisher" field set to docker
  • NOTE: I am still running cron in the same container as Apache. Sorry.
  • Apache access logs to STDOUT and error logs to STDERR

Installation

  1. Make sure the DB install finishes successfully, via the container logs; it can take quite a bit of time. The last line of container output before starting Apache in the foreground should be Starting apache...
  2. Point a browser to the web UI HTTP address for the container. Follow the installation process. Default credentials are username glpi and password glpi.
  3. Configure GLPI as desired. My usual process is:
    • Setup -> General -> General setup
      • Set "URL of the application"
      • Set text in login box to Log in with username "tech" and password "tech"
      • Set "Time to allow "Remember Me"" to 60 days
      • Save
    • Setup -> General -> API
      • Set the URL, enable everything, save
    • Administration -> Users - for "normal" and "post-only", select them, click Actions, select "Put in Trash Bin"
    • Administration -> Inventory - check "Enable inventory" and then Save
    • Top right corner, click your profile icon, "My Settings", set your Time zone and Save.
    • Setup -> General -> Default Values -> Personalization -> Timezone, set your Time zone and Save.

Quick reference

TAGS

Default accounts

Login Password Role
glpi glpi admin account
tech tech technical account
normal normal "normal" account
post-only postonly post-only account

Read the documentation

Know that I have no connection with the team that develops GLPI and/or TecLib. If you encounter a problem with this image , you can create an issue, i will help you with pleasure. If you encounter a problem with GLPI and/or need more information on how it works, I recommend that you read the documentations:

GLPI Administrators Docs

GLPI Users Docs

About SSL

The installation of GLPI is done without SSL. If you need to open access to GLPI from the outside and/or an SSL certificate, I recommend that you use a reverse proxy.

Deploy with CLI

Deploy GLPI

First MariaDB image using:

docker run --name db -e MYSQL_ROOT_PASSWORD=rtpsw -e MYSQL_DATABASE=glpi -e MYSQL_USER=user -e MYSQL_PASSWORD=psw -d mariadb:10.11-rc 

Next run GLPI image:

docker run --name glpi --link db:db -p 80:80 -e MYSQL_HOST=db -e MYSQL_DATABASE=glpi -e MYSQL_USER=user -e MYSQL_PASSWORD=psw -d jr0w3/glpi

⚠️ If you change the password on the database deployment command, don't forget to do it also for the GLPI deployment command.

Deploy GLPI with database and persistence data

First MariaDB image using:

docker run --name db -e MYSQL_ROOT_PASSWORD=rtpsw -e MYSQL_DATABASE=glpi -e MYSQL_USER=user -e MYSQL_PASSWORD=psw --volume /var/lib/mysql:/var/lib/mysql -d mariadb:10.11-rc 

Next run GLPI image:

docker run --name glpi --link db:db -p 80:80 -e MYSQL_HOST=db -e MYSQL_DATABASE=glpi -e MYSQL_USER=user -e MYSQL_PASSWORD=psw --volume /var/www/html/:/data -d jr0w3/glpi

⚠️ If you change the password on the database deployment command, don't forget to do it also for the GLPI deployment command.

Deploy GLPI with docker-compose:

version: '2'

volumes:
  data:
  db:

services:
# mariaDB Container
  db:
    image: mariadb:10.11-rc
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    environment:
# It is strongly recommended to change these identifiers by other more secure ones.
# Don't forget to report them in the app service below.
      - MYSQL_ROOT_PASSWORD=rtpsw
      - MYSQL_PASSWORD=psw
      - MYSQL_DATABASE=glpi
      - MYSQL_USER=user

#GLPI Container
  app:
    image: jr0w3/glpi
    restart: always
    ports:
      - 80:80
    links:
      - db
    environment:
      - MYSQL_PASSWORD=psw
      - MYSQL_DATABASE=glpi
      - MYSQL_USER=user
      - MYSQL_HOST=db

⚠️ If you change the password on the database deployment command, don't forget to do it also for the GLPI deployment command.

Deploy GLPI with docker-compose, database and persistence data:

version: '2'

volumes:
  data:
  db:

services:
# mariaDB Container
  db:
    image: mariadb:10.11-rc
    restart: always
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - db:/var/lib/mysql
    environment:
# It is strongly recommended to change these identifiers by other more secure ones.
# Don't forget to report them in the app service below.
      - MYSQL_ROOT_PASSWORD=rtpsw
      - MYSQL_PASSWORD=psw
      - MYSQL_DATABASE=glpi
      - MYSQL_USER=user

#GLPI Container
  app:
    image: jr0w3/glpi
    restart: always
    ports:
      - 80:80
    links:
      - db
    volumes:
      - data:/app/data
    environment:
      - MYSQL_PASSWORD=psw
      - MYSQL_DATABASE=glpi
      - MYSQL_USER=user
      - MYSQL_HOST=db

⚠️ If you change the password on the database deployment command, don't forget to do it also for the GLPI deployment command.

About

A GLPI 10 container associated with MariaDB with frontend and backend.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • PHP 91.3%
  • Dockerfile 6.3%
  • Shell 2.4%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载