I am very new to docker and containers etc. I would like to know when the its the best option to use Docker. Is it something you use on every project/app or is it only in certain situations?
I’m hoping to create a web application soon and would like to know if I should use Docker.
Yes, you should always use containers, for everything !!! I try very hard not to install anything in my base operating system, other than the minimum tools to start a docker container
mmm, but perhaps a more reasonable answer is - it depends…
I like using containers to make development a repeatable breeze - so that when I switch computers (or install a different distro / OS) I can just do something like
git clone source
docker build -t dev .
docker run -it -v $(pwd):$(pwd) dev
And then I can do my development inside that container, build and test / run
without relying on whatever underlying OS I have, and knowing that the libraries I’m using are exactly the ones specified in the Dockerfile.
This also makes it simple for others to try things out, send patches, and know that their initial setup is exactly the same as mine.