yii2-docker icon indicating copy to clipboard operation
yii2-docker copied to clipboard

Replace deprecated nginx docker image with current one

Open kmindi opened this issue 5 years ago • 8 comments

Hi, apparently the used docker image for nginx in docker-compose.fpm-nginx.yml (even though it's not directly clear where these files are intended to be used compared to the docker-compose.yml) is deprecated and should be replaced by https://hub.docker.com/r/dmstr/php-yii2/tags/

https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml#L4

kmindi avatar May 23 '20 17:05 kmindi

You need a special config for nginx (FASTCGI_PASS_HOST) to connect both containers. This is not available in the standard nginx container.

Actually, running nginx and fpm as separate containers creates several issues with eg. assets due to the need of shared volumes.

I'd rather go with https://github.com/yiisoft/yii2-docker/issues/12 (nginx and fpm in one container)

schmunk42 avatar May 25 '20 08:05 schmunk42

If #12 solves this deprecated usage I'm fine with that. I only suggested the docker image proposed in the depcreation notice but have no preferences how it should be approached.

kmindi avatar May 25 '20 08:05 kmindi

@kmindi What exactly makes the nginx image deprecated, btw?

schmunk42 avatar May 26 '20 14:05 schmunk42

At least the one linked in the file https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml#L4 is deprecated when you visit their github page with their deprecation notice https://github.com/phundament/docker-images and look at the last update 4 years ago on docker hub as well.

kmindi avatar May 26 '20 14:05 kmindi

Ah yeah :) I thought there was a security issue or announcement from nginx.

schmunk42 avatar May 26 '20 19:05 schmunk42

I am not completely sure how that dependency is used or not, but if those 4 year old docker images would be used, then I suppose they'll include security issues most certainly

kmindi avatar May 26 '20 21:05 kmindi

I think I understood now that you only put the file https://github.com/yiisoft/yii2-docker/blob/master/docker-compose.fpm-nginx.yml as example and that is not used in the docker published docker images.

E.g. when I use the FPM variant of the published docker image, I need to make sure to have a reverse proxy (such as nginx) running myself. Still the provided example uses 4 year old code and should either be removed completely or updated.

kmindi avatar Jun 06 '20 12:06 kmindi

PRs very welcome, btw :wink:

schmunk42 avatar Jun 30 '20 11:06 schmunk42

I've added an nginx flavour (nginx on the image with supervisor), the deprecazed nginx image was removed completely.

schmunk42 avatar Jan 24 '23 14:01 schmunk42