Docker Desktop on a Linux VM

Docker Desktop on a Linux VM

01/15/26


About Docker

Docker is a tool that lets you package an application together with everything it needs to run (dependencies), into a lightweight, portable unit called a container. Instead of worrying about whether or not it will run on a specific machine, Docker ensures the app runs the same way anywhere: your laptop, a server, or the cloud. Containers start quickly, use fewer resources than virtual machines, and are easy to create, destroy, and reproduce, which makes development, testing, and deployment much simpler and more consistent.

Installation

After taking some time to understand the basics, the next step was to get the Docker Desktop client installed locally. I chose to install on a Ubuntu Linux VM running on VirtualBox because Docker integrates more naturally with Linux, and let’s you use a bash terminal.
 
I downloaded the .deb package from Docker’s website and ran the install:
sudo apt-get update sudo apt install ./docker-desktop-amd64.deb

Nested Virtualization

After installation, there were a few host-level configurations required to allow KVM (Kernel-based Virtual Machine, Linux’s native virtualization technology) to run inside Ubuntu. Because Ubuntu itself is running inside a virtual machine, KVM requires nested virtualization to be enabled on the host. Nested virtualization allows the host hypervisor to expose hardware virtualization extensions (such as Intel VT-x or AMD-V) to the guest operating system, allowing the guest to run its own virtual machines using KVM.
 
On the host machine the following must be disabled from optional features:
  • Hyper-V
  • Windows Hypervisor Platform
  • Windows Subsystem for Linux (WSL)
  • Virtual Machine Platform
These features take exclusive control the VT-x extension that KVM needs. Disabling them allows VirtualBox to expose nested virtualization to the VM.
 
Next, I ran the command:
bcdedit /set hypervisorlaunchtype off
in PowerShell as Administrator. This ensures that on reboot Windows won’t reload the hypervisor and blocking VT-x. After making these changes I rebooted the host machine.

Running a Container

To validate the install and try running a container I ran the following:
docker run -d -p 8080:80 docker/welcome-to-docker
You can see from the images below it successfully downloaded the image from Docker Hub and ran the container on localhost port 8080.
notion image

The container running in Docker Desktop.
The container running in Docker Desktop.

Container deployed successfully to port 8080.
Container deployed successfully to port 8080.

Conclusion

Docker Desktop can be a bit tricky to set up inside a VM, but it’s a doable option, and great for practicing your bash and problem-solving skills! I’m looking forward to experimenting and using this setup to gain strong Docker skills.