I get how containers make running a stateless service easy.
However if you are developing, you don’t want to build and rerun a container every time you change a line of code so you have the raw components and code running on your machine nativity. Also it would be inconvenient to have to ssh into each container to view its log files etc.
In production, containers are mostly statefull, e.g databases, Java process which need on the fly. Tuning, web servers which have content uploaded. Presumably these are bad candidates for containers as they are deployed once only then upgraded with scripts and managed with ssh (which is more laborious). For log files I guess you can setup filebeat or similar on each box.
Also, I have seen test apps put on the internet by devs have the Docker containers hacked in minutes because devs don’t setup any ssh security such as fail2ban, disabling root, using keys, rate limits in UFW, changing default passwords etc. Now containers are banned in our dev and test envs as our ISP shuts down the whole server when one container gets hacked. Obviously in prod you would not allow ssh from outside VPN’s etc. But poor container security is still a concern.
So given the stateful and security requirement, what are the main use cases for docker?