If you're using Windows Terminal you should be! The easiest way to do this is to open up the settings. You can do this by deleting the contents of the file鈥擳erminal will automatically repopulate it with the defaults, which will include a tab for WSL. Obviously you won't want to lose your setting customisations, so make sure to backup the contents of the file first! You're looking for WSL in the profiles list鈥攁dd that to you profile list, and you'll be able to quickly open up your WSL instance from Windows Terminal!
Head to the Docker Desktop website and download the Installer for Windows.. The Docker Desktop installer will automatically log you out of your Windows account on completion. Eventually, the main Docker Desktop window will pop up, and offer you a tutorial. With Docker Desktop installed, you now have the docker command available in your command prompt:.
This is a simple Razor Pages app, packaged in a Docker image, and ready to run. You can see the Dockerfile for the app here. When you run the above command Docker will pull the image, run it and start listening:. The interesting thing, which I didn't realise until I installed it, is that Docker Desktop for Windows installs a very nice UI for managing your containers!
You can also inspect the environment variables, view stats about the container, or click CLI to open a shell inside exec into the container! You can do all these things from the command line obviously, and if you're automating things, that's definitely the right option.
For casual or local development, personally I find you can't beat a nice GUI! This requires a restart of Windows and a logout which is a bit annoying, but otherwise it went very smoothly. The Docker Desktop UI also looks very handy, in particular the ability to exec into a container鈥擨'm always getting the CLI command wrong, so that will be very unseful! Restart Time to restart your machine to ensure everything is registered correctly.
Note, if you see the following error when running the update, make sure you've restarted your machine afer installing the WSL 1 and VM features: The installer runs very quickly, and hopefully you'll see a confirmation screen, something like the following: 5. Set WSL 2 as your default version This is an easy step, just run wsl --set-default-version 2 in any PowerShell window: 6. Optional Install a Linux distribution We actually don't need to install a Linux distribution to use Docker Desktop, but if you want to shell into Linux directly, you'll need to install one.
That's the prerequisite starter for Docker Desktop covered, so now lets get to the main course! The following hardware prerequisites are required to successfully run Client Hyper-V on Windows Containers and images created with Docker Desktop are shared between all user accounts on machines where it is installed.
This is because all Windows accounts use the same VM to build and run containers. Note that it is not possible to share containers and images between user accounts when using the Docker Desktop WSL 2 backend. Nested virtualization scenarios, such as running Docker Desktop on a VMWare or Parallels instance might work, but there are no guarantees. For more information, see Running Docker Desktop in nested virtualization scenarios. It typically downloads to your Downloads folder, or you can run it from the recent downloads bar at the bottom of your web browser.
Follow the instructions on the installation wizard to authorize the installer and proceed with the install. When the installation is successful, click Close to complete the installation process.
If your admin account is different to your user account, you must add the user to the docker-users group. Right-click to add the user to the group. Log out and log back in for the changes to take effect. It includes a change to the terms of use for Docker Desktop. Click the checkbox to indicate that you accept the updated terms and then click Accept to continue. Docker Desktop starts after you accept the terms.
If you do not agree to the updated terms, the Docker Desktop application will close and you can no longer run Docker Desktop on your machine. You can choose to accept the terms at a later date by opening Docker Desktop. For more information, see Docker Desktop License Agreement. This tutorial includes a simple exercise to build an example Docker image, run it as a container, push and save the image to Docker Hub.
When an update is available, Docker Desktop displays an icon on the Docker menu to indicate the availability of a newer version. Additionally, the Software Updates section in Preferences Settings on Windows also notifies you of any updates available to Docker Desktop. Starting with Docker Desktop 4.