Example: Download the latest version of Ubuntu Desktop and create the Ubuntu VM with your preferred virtualization software.
Follow the instructions here to install docker.
Note:
If you are seeing the following error after running
sudo apt-get install docker-ce
to installdocker-ce
.E: Invalid operation docker-ce
Try running the following command to setup the stable repository that instead specifies an older Ubuntu distribution like
xenial
instead of usinglsb_release -cs
(usingbionic
doesn't seem to always works).$ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ xenial \ stable"
Now try running
$ sudo apt-get install docker-ce
again.
To manage docker as a non-root user (so you don't have to keep using sudo
) follow the instructions here. You must log out and log back in (or just restart your VM) so that your group membership is re-evaluated