Super-Visions / docker-itop

https://hub.docker.com/r/supervisions/itop/
18 stars 19 forks source link

Volume mapping does not support the toolkit #13

Closed pate313373 closed 10 months ago

pate313373 commented 11 months ago

Hi,

I'd rather like to be able to map /var/www/html as a whole, because the current volume setup does not allow to deploy extensions and the toolkit itself... :(

Kind regards

Hipska commented 11 months ago

Yes, you can add extensions by mounting them as usual:

docker run -d -p 80:80 --name=my-itop -v ./toolkit:/var/www/html/toolkit -v ./my-extension:/var/www/html/extensions/my-extension supervisions/itop:latest 

It is a very bad idea to try to mount /var/www/html as a volume, as that will make upgrades very difficult. That is why I created volumes for the essential directories (data, env, log, ..)

pate313373 commented 11 months ago

Could you elaborate why it's a bad idea?

Hipska commented 11 months ago

As then you completely decouple the iTop source code files from the image/container. When you later want to update the container to a newer version of iTop, then it will not do anything as the code is already copied to your volume, and thus updating the image will have no effect.

If you really want to do this, I would advise to just run a plain php:apache container and mount the iTop code manually.