What about docker images for dolibarr ?

Hello,

I was thinking that an official Docker image would be really great to install very easily Dolibarr and to update it rapidly and safely.

What do you think ? Has it already been discussed somewhere or imagined ?

Something like a container containing the PHP server, another for the database, and a volume data for every files we want to keep (pdf, odt, …).

3 Likes

Hello, i’ve just search for “dolibarr docker” in my favorite search engine and i guess you should do the same.
Regards

Providing an official image looks to me a good idea.
The condition is having a script we can launch from a linux platform to be able to generate the docker image starting from the dolibarr git cloned directory. If someone can provide such a script, i can include it into our package generation process.

1 Like

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.

Yes…but that’s not official – as in from “dolibarr” itself as requested by the OP.

+1 I think it’s a good idea to have an official docker image, or at least there should be a docker section in the documentation. As a newbie, before landing in this forum, I thought there’s no easy way to install Dolibarr in docker.

We are migrating everything to docker at the moment but I have not dived in the topic of publishing container images.
Without knowing how it IS possible and done by many projects to use the combination github/dockerhub to automatically generate a container images from a TAG in github and publish to dockerhub (and/or github container repository).
That way a “simple” documentation on the wiki will make a quick spinup easy.
Even easier with docker-compose.

BUT: This image should be easily controlable with ENV variables. That is a more tricky task.

Maybe these devs are open to collaborating on an official images:

1 Like