Docker Super Beginners -Prepare the environment(Installation)- For the Windows users by using virtual box and Ubuntu

mhiratsuka
7 min readMar 6, 2018

--

Hello. Do you know Docker? Maybe you might have seen a cute whale mark that carries containers. Docker is so popular recently and you have heard that like largest companies had started to adopt Docker.

Because of adopting the Cloud system, we are easily enabled of creating and managing virtual environment, while the tasks of application developer have expanding instead infrastructure developers handle. As one of application developer, I have started to learn infrastructure and try to use Docker.

Today, I will show how I made an environment to use Docker in my laptop(Windows 10). This tutorial is suitable for windows user and super beginner of Docker but want to try Docker. If you want to explore more knowledge about Docker, my article might be useless. However, I would be happy if you give me more advice.

Let’s get started.

Docker is a container management platform where developers can create, deploy, and run application.

The main features of Docker I have understood so far are:

1. You can deploy fast.

2. You can run containers everywhere.

3. You can save the usage of hard disc.

You might not understand so we can learn by using Docker. Don’t hesitate to move on.

From here, I will show you the installation from Virtual machine, Ubuntu, and Docker. We have another way that we install Docker Tool. But let’s try to install ubuntu to understand system side more today.

Index

1. Install VirtualBox (5.2)(If you already have, you can skip this)

2. Install Ubuntu(Ubuntu 16.04.4 LTS) in the VirtualBox(If you already have, you can skip this)

3. Install Docker(Docker CE)

1. Install VirtualBox (5.2) (If you already have, you can skip this)

Official Home Page: https://www.virtualbox.org/

1. Click the Download.

2. Click Windows hosts and start setup once you download.

3. Click Next.

4. Don’t change anything and click the next.

5. The default is all checked but you can change. It is up to you.

6. Click Yes.

7. Click Install.

8. Check the checkbox and Finish.

9. You can see the following screen if you successfully install. Congrats!

2. Install Ubuntu(Ubuntu 16.04.4 LTS) in the VirtualBox (If you already have, you can skip this)

Official Home Page: https://www.ubuntu.com/download

  1. Go to the official home and click this.

2. Click Download.

3. Open the VirtualBox and click New.

4. Decide a name by yourself and follow Type and Version like the following.

5. Arrange the amount of memory. It is up to yours. You might be asked to need to increase the amount of memory when you install Docker, though.

6. Select the following and click Create.

7. Choose the first one and click Next.

8. Choose the first one and click Next.

9. Right-click on the HD you just added and click Setting.

10. Click Enable 3D Acceleration if you still have enough amount of video memory.

11. Click the following to add an optical drive.

12. Click Choose disk.

13. Click the image you download in Ubuntu Official Site.

14. Choose Bridged Adapter.

15. Select the Ubuntu virtual image file and click Start.

16. After waiting, you can see the following screen. You can choose your language and click Install.

17. Check the Download … and click Continue.

18. Check Erase… and click Install Now.

19. After getting the following popup message, click Continue.

20. This is where you live. Just click continue.

21. Choose your languages.

22. You can set whatever you want. I set the following.

23. Just wait…

24. Click Restart Now.

25. You successfully installed Ubuntu if you can see the following screen!

Finally, we reach the point of installing to docker 😉

3.Install Docker

Official Home Page: https://docs.docker.com/install/linux/docker-ce/ubuntu/#extra-steps-for-aufs

  1. Open a terminal on your Ubuntu. You can search it by tapping window button.

2. Before you install Docker, please check your Linux kernel version running. Because Docker can only run on Linux kernel version 3.8 or higher.

Syntax: uname -a

Mine is 4.13 which is higher than the necessary so I can keep going.

3. You have to update the OS with the latest packages.

Syntax: sudo apt-get update

4. To install the necessary certificates, you can follow the following command.

Syntax: sudo apt-get install apt-transport-https ca-certificates

5. To install curl command and binary package “software-properties-common”, do the following command

Syntax: sudo apt-get install curl software-properties-common

* You would do the 4 and 5 syntax at the same time.

6. Add Docker’s GPG key.

Syntax: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

7. Check whether you have the key with the fingerprint

Syntax: sudo apt-key fingerprint 0EBFCD88

8. Set up the stable repository.

Syntax: sudo add-apt-repository \

“deb [arch=amd64] https://download.docker.com/linux/ubuntu \

$(lsb_release -cs) \

stable”

9. Before installing Docker CE, update the OS with the latest packages.

10. You can simply install the latest version of Docker by using the following command.

Syntax: sudo apt-get install docker-ce

11. Verify whether you can install Docker correctly.

Syntax: sudo docker run hello-world

You have finished everything now! It takes a little bit time but now we are on the start line of using Docker!

--

--