Install VirtualBox ->Ubuntu ->Docker on Windows 10

Arman Davtyan
4 min readFeb 2, 2020

--

In 15 steps you will install Virtual Machine, Ubuntu on VM, and Docker inside the VM Ubuntu on Windows 10

New York, Long Island

VirtualBox

Step 1:
Download virtual box from https://www.virtualbox.org/wiki/Downloads

I have chosen ‘’ VirtualBox graphical User Interface, Version 6.1.0 r 135406 (Qt5.6.2) ‘’

Step 2:
Install the VirtualBox ‘’VirtualBox-6.1.0–135406-Win.exe’’

Step 3:
Download the Linux version you need from https://ubuntu.com/download/desktop.⁵

I am using version ‘’ubuntu-18.04.3-desktop-amd64.iso’’ which you can find here

http://releases.ubuntu.com/18.04/

so go ahead and download the desktop image.

Step 4:
Now go back to VirtualBox and run the software. Click on new and this will open a window.

In this new window give a name to the system (ex yourname_ubuntu) and choose Type Linux, Version Ubuntu (64-bit). Click next.

In this example, I used the name ‘’new’’.

Step 5:
Choose memory size 10000mb (depends on your computer), click next, and select Create a virtual hard disk now, click next. Select VDI (VirtualBox disk image). Click next and set the memory size your operating system will have. I used a fixed size and 55Gb. These steps are shown in the images below.

Step 6:
Now you should be seeing on the left panel of VirtualBox the instance called ‘’new’’. Select new and go to settings/storage. On the right to Controller IDE click on add and select the Linux ubuntu file you have downloaded in step 3. Set OK and now click on Start in VirtualBox panel.

Step 7:
Once started you will see the following image below. Choose the Ubuntu version.

It will take a bit of time until you will see the Ubuntu starting.

Now that you see the image below follow the instructions and install Ubuntu for your preferred language and keyboard layout.

Step 8:
Once all is done and you see the following below

feel free to right-click on the icon in the below image and remove the installation medium

Step 9:
Go to setting in VirtualBox and increase the Video Memory from the Display panel and increase the number of processors from System/processor

Step 10:
In order to make the window size increasing (or full screen) in VirtualBox go to the menu and choose Devices, Insert guest additions CD image, then wait for a mock-CD ROM to appear and run the install from there.

Congratulations now you have to be all set to start installing the Docker.

Install Docker

Step 11:
Before we install docker we make sure that all the software on the system are currently in their latest update stage. To do this open terminal and hit

$ sudo apt-get update

Step 12:
To install a docker type in the terminal

$ sudo apt install docker.io

(note 1: sometimes this command will not work if you have a different version of the software, in order to check which command you have to use you can type in terminal just docker install, this will show available commands to install the docker)

(note 2: sometimes note 1 does not work and you see an error message. Try to restart the ubuntu as suggested in the link https://www.linuxuprising.com/2018/07/how-to-fix-could-not-get-lock.html. For me the restart solved the problem.)

Step 13:
Now that Docker is installed you need to install all the dependency packages. for this type in terminal:

$ sudo snap install docker

Step 14:
Check the version of the docker we have installed:

$ sudo docker — version

(in my case this was: Docker version 18.09.7, build 2d0083d

)

Step 14:
Pull hello-world image from docker hub:

$ sudo docker run hello-world

Step 15:
Confirm that you have hello-world example:

$ sudo docker images

If successful you will see something like this:

Congratulation, this means now you have docker working on your system.

--

--