Hello eldy,
Actually you could already have an official automated build directly from Docker hub I guess, thanks to the Dockerfile on the dolibarr github. With auto-configured hook, at each commit on the specified branch it can rebuild directly the new image.
Otherwise, I don’t understand the need of a script to generate the docker image. Is it something like the following?
#! /bin/bash
# You have to be logged on docker hub first, using "docker login" command
git clone https://github.com/Dolibarr/dolibarr
docker build -t Dolibarr/dolibarr:latest dolibarr/
docker push Dolibarr/dolibarr
Concerning the use of volume and other containers for Dolibarr, I’ll try to create a docker-compose file.