OCSInventory-Docker-Image
OCSInventory-Docker-Image copied to clipboard
Addressing some issues
Must read before submitting
Please, take a look to our contributing guidelines before submitting your pull request. There's some simple rules that will help us to speed up the review process and avoid any misunderstanding
Status
READY
Description
In our organization we like to use OCS-Inventory with docker. So we tested a lot and encounter some things that could be improved. Internally we now build our own image, but i want to share the main things we invented. First of all we changed the sed commands in the entrypoints with perl, so that complex passwords with special characters are no problem anymore. Secondly we implemented the opportunity to use the install.php script in the image, if it is necessary. The last thing is, that we shrink the size of the image while using docker multistage build. Now the image is around 327 MB. Before the change it was 547 MB. The trick is to not have build-essential in one of the image layers.
I hope you can make use of it and that the addressed issues can be solved with that PR. Please comment if you have questions and sth. is unclear.
Related Issues
https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/issues/99 https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/issues/98 https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/issues/81
Todos
- [ ] Tests
- [ ] Documentation of the new Env Variable for adding install.php to create new Database (https://wiki.ocsinventory-ng.org/13.Docker-documentation/Using-the-docker-image/)
- [ ] Push new docker image to dockerhub
Test environment
I did some tests with it, but didn't use nginx.
General informations
Docker host's operating system : Debian 11 and Ubuntu 22.04 (testet both) Mysql Server version : MariaDB 10.11
Docker informations
Docker compose version : 1.25.0 Docker version : 20.10.5
Deploy Notes
Notes regarding deployment the contained body of work. These should note any dependencies changes, logical changes, etc.
Impacted Areas in Application
List general components of the application that this PR will affect:
- Dockerfile
- Webserver folder with possibility to add install.php by purpose.
- Entrypoints
- Version