swoole / docker-swoole

🏄 Official Docker Image of Swoole
https://hub.docker.com/r/phpswoole/swoole
Apache License 2.0
534 stars 113 forks source link

v5.0.0 doesn't seem to install inotify-tools? #34

Closed XhmikosR closed 2 years ago

XhmikosR commented 2 years ago

latest tag seems to include inotify-tools: https://github.com/swoole/docker-swoole/blob/982e30fd2475a83e36a73a181d3e10a6118c1aa5/dockerfiles/latest/php8.1/cli/Dockerfile#L18

but v5.0.0 doesn't: https://github.com/swoole/docker-swoole/blob/master/dockerfiles/5.0.0/php8.1/cli/Dockerfile

BTW aren't inotify-tools redundant in production? Just thinking out loud here :)

deminy commented 2 years ago

Package inotify-tools doesn't need to be explicitly installed in advance. Script autoload.sh can automatically install and run it if a container is started with environment variable AUTORELOAD_PROGRAMS set, as you can see from the first example.

Thus, the auto-reload feature works both for latest images (e.g., latest) and versioned images (e.g., 4.8.11-php8.0).

The latest images are built daily using latest source code from the master branch of Swoole. It's mostly for testing and local development purposes; we won't expect people using them on production. Thus package inotify-tools is installed in latest images (so that people don't need to install it when starting new containers). We can remove the package from latest images if there is a good reason for that.

XhmikosR commented 2 years ago

Thanks for the reply!

My main issue here is the confusion. I mean, at a first glance, I couldn't tell if inotify-tools are installed in v5.0.0 and if so, I could proceed with removing it from my Dockerfile.

deminy commented 2 years ago

I agree that it's not that clear at first glance, but I also see the benefits of having it preinstalled (in the latest images).

To avoid confusion, I updated comments in some files. Hope it helps.

XhmikosR commented 2 years ago

Thank you!

BTW, would it be possible to release new 5.0.x releases with the latest PHP? Also, have you thought about using Git tags? It would make comparison easier between versions.