Super-Visions / docker-itop

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

Volume mapping does not support the toolkit #13

Closed pate313373 closed 1 year ago

pate313373 commented 1 year 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 1 year 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 1 year ago

Could you elaborate why it's a bad idea?

Hipska commented 1 year 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.