ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Follow publication

You're unable to read via this Friend Link since it's expired. Learn more

Member-only story

Entity Framework Dev Environment in Docker

Andy Watt
ITNEXT
Published in
8 min readDec 13, 2021
Photo by Campaign Creators on Unsplash

Am I becoming a bit of a Docker dev environment bore…? I hope not! This time around I’m going to present a really compelling Docker use case, that I think can have an immediate impact for pretty much any size of dev team. This is my favourite one so far!

Over the last 17 years working as a developer, I’ve been onboarded to more projects now than I care to count. These days, getting the code down locally is normally a simple git clone and away we go. Getting a local database up and running is often much more of a pest. Specifically, I often find that I need to install a specific version of a specific database platform, and then either locate snapshot files, run a script, or get “the guy” who has done this for all the new starts for the last ~100 years to do it. All of which is not ideal.

Using dev containers and Visual Studio Code can alleviate all of this pain, and get the database down locally, also with a git clone.

I think that using Docker to configure and store the dev environments is an extremely powerful concept. It is the next evolution of ‘infrastructure as code’. When Docker is used, we essentially end up with ‘dev environment as code’. The code that defines the environment moves with the repo, and is updated and changed as the project grows. This means that the dev environments are always synchronised, and are never out of date.

In this post, I’ll demonstrate how to set up the database server in a Docker container, and initialise it with some basic data in such a way that a new dev on the team can simply git clonethe repo, and start coding immediately. There is zero additional overhead to set up the local database.

The code for this example is here on my Github.

This post will focus only on the database project, but remember that I have previously shown how to do this with a .NET WebAPI, and also an Angular front end. These three could be combined into a full stack environment… Watch this space.

As ever the prerequisites are:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Written by Andy Watt

Technical Lead and co-founder at Avalone Consultants. Angular, .NET, and blockchain developer.

No responses yet

Write a response