Alternative to Docker Desktop
Step 1
Download and install Vagrant: https://developer.hashicorp.com/vagrant/downloads
Step 2
Install Oracle VirtualBox: https://www.virtualbox.org/wiki/Downloads
Step 3
Create and configure virtual machine using Ubuntu OS:
https://app.vagrantup.com/bento/boxes/ubuntu-18.04
Create a folder for the VM and open an instance of Windows PowerShell at that location, then run the
below commands.
This will generate a Vagrant file at that location.
Step 4
Open the Vagrant file, delete all the comments and add the following:
config.vm.hostname = "vm1"
config.vm.network "forwarded_port", guest: 8080, host: 8080
In order for the changes to take effect, open a Terminal window in your VM folder and run:
The virtual machine is now configured.
Step 5
Run the Virtual Machine by executing in a Terminal window the following command:
Step 6
Install Docker using the following instructions:
1. Update the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
2. Add the official GPG key of the Docker repository:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o
/usr/share/keyrings/docker-archive-keyring.gpg
3. Add the Docker repository to your system's sources.list.d directory:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]
https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee
/etc/apt/sources.list.d/docker.list > /dev/null
4. Update the apt package index again:
sudo apt update
5. Install Docker by running the following command:
sudo apt install docker-ce docker-ce-cli containerd.io
6. After the installation is complete, verify that Docker is installed and running properly by checking the
Docker version:
docker version
7. Optionally, you can add your user to the `docker` group to avoid using `sudo` when running Docker
commands:
sudo usermod -aG docker $USER
Note: You will need to log out and log back in for the changes to take effect.
That's it! You now have Docker installed on your Ubuntu virtual machine.
Resources:
https://www.youtube.com/watch?v=a6W1hF9CgDQ&ab_channel=DevOpsJourney