3 ms·
Nginx can be updated and restated without loosing any connections. With Nginx under docker it is not possible.
by fpoling 9y ago
Nginx can be updated and restated without loosing any connections. With Nginx under docker it is not possible.
- marcc 9y agoWhy isn’t this possible using docker? I would assume you could still issue an nginx reload command to the container running docker, since it’s the same nginx software running.
- qorrect 9y agoShould be the same I agree. Not only that, under docker you could also have them behind a loadbalancer and just upgrade one at a time with no down time.
- idunno246 9y agowhile it may be possible, its frowned upon. The docker way is immutable containers, so you want to edit the nginx config you 'cant' just do it in place, you need to make a new container with the new config and a new process and kill all the existing containers(and hence processes/connections). docker is basically at the point today where mapreduce was a few years ago. while it may solve some problems, its not a thing that solves everything.
- marcc 9y agoYou could mount the nginx.conf files into the container so they are editable. The “correct” way to run a Docker container is to supply the config at runtime, not at image build time.
- fpoling 9y agoI have not meant the reloading of a configuration. Nginx supports live update of the executable itself when one can update the binary without loosing any connections. Docker just does not support that unless one uses Docker as a mini-os when one runs updates inside the container defeating the purpose of Docker.