2 ms·
If you can make your app fit in a single binary and you do not _need_ Docker's features, then yes, I don't see why you'd bother using it. Docker shouldn't be yo
by yberreby 5y ago
If you can make your app fit in a single binary and you do not _need_ Docker's features, then yes, I don't see why you'd bother using it. Docker shouldn't be your immediate go-to. It's just another tool that can help with some problems.
Things do become more complicated when your app is a single logical unit that depends on a number of resources / services. Maybe you want an nginx reverse proxy in front of it, a database engine behind it; maybe Go isn't the only language you're going to use. Maybe you want the ability to effortlessly run the exact same setup as your production environment somewhere else without having to run a bunch of Ansible playbooks on the target host, and without worrying about the Linux distribution on it. Docker and docker-compose can help with these use-cases and get you up and running quickly.
I'm not saying Docker is ever a _necessity_. But it can be a great convenience. In the end, use the simplest solution that fits your requirements, and make sure you can extend it later on if those requirements change.