Windows 11 – Docker Desktop with engine running on WSL2 and Kubernetes

Everything has changed since I started my career many years ago developing software in Delphi, Java and others languages and using some of the traditional packaging options we’ve had at the time. We didn’t have so many options for source control and continous integration and delivery was not even a thing back then.

With the revolution brough by the cloud, containers became the de-facto standard packaging and deploying software for almost everything in the cloud, or even at the edge nowadays. In this context, if you are in the development realm, it is almost impossible to not have heard about Docker and Kubernetes.

I use them both in my Windows desktop for local development. The easiest way for me to have everything working in just a few minutes is to use Docker Desktop.

Docker Desktop is free for individual, education and open source, but paid, subscription based for corporations. I believe the cost is pretty fair for companies making that kind of money and leveraging the tooling.

For a complete view of the subscription models, they have a pricing page at Pricing | Docker

The download can be done via official page at Docker: Accelerated, Containerized Application Development

I like to install docker using WSL2 instead of Hyper-V, then I leave that option enabled and disable the creation of desktop shortcut. I like my desktop as clean as possible. Then we go with Ok.

Irrespective to which option you want to use for your engine, I have created a post on how to install both, available at Windows 11, Windows Subsystem for Linux and Hyper-V – Fernando Silva

It will take some time to install all the packages.

Once finished installing you will be asked to Close and logout.

When you log back in into Windows desktop, you will be presented with the service agreement. Read and make you are in accordance with the terms before continuing.

You may see a page asking for feedback like the below one. You can choose to reply or Skip. I my case I will Skip.

Similar for the tutorial.

In the main window I like to configure a few other things. For that is needed to click in the cog icon.

First, in the General tab I disable Send usage statistics and Show weekly tips. Then Apply & restart.

Then under Kubernetes tab, select Enable Kubernetes. It is useful for local testing before sending every piece of work back to the cloud.

Confirmation to install will be prompted. Select Install.

You can close the settings window by clicking in the X on top right. Once installation is finished, the two cards with Docker and Kubernetes logo on bottom left of the application will be set with green background.

Now, everything is installed and we have both Docker and Kubernetes operational.

One of the usages for me on local development is for having a local PostgreSQL database that I can destroy and re-create with ease. I use docker command line tool to build the container image I’m working on before sending over to a container registry to test in the cloud for example. Once everything looks good, then we can think of commiting to the source control on and having the GitHub Actions to take care of sending to the final registry and publishing to the appropriate service.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s