Using Docker for local web development
If you’re new to Docker, it’s hard figuring out even what to search for, and how the concepts tie together, let alone what to pay attention to for your use case.
To make things more difficult, there has been a lot of change over time, and stuff that was once recommended is now not recommended, for example, a lot of older video tutorials recommend using container links which have since been deprecated in favor of user-defined bridge networks .. in case you’re unfamiliar with this, I’ll cover what this means, and why you’d use it later in the blog post.
Once you learn the basics, using Docker in practice is fairly straightforward, and if you’re using Docker at home or at work, the time you spend learning now will save you a massive amount of time and effort in the future.
If you’ve used Docker a bit, are familiar with some of the concepts, how dabbled here and there, but sometimes struggle with connecting some of the concepts, or how to get things set up end-to-end, then this blog is for you.
In this blog post, I’ll guide you through step by step on:
- The distinction between docker image and containers
- Best practices on how to persist data within containers, and how to control where data is persisted
- How to continue developing on your local machine as usual, while your app is running within a docker container on your local machine
- How to connect your containerised web app to a containerised Microsoft SQL Server