Skip to content

Latest commit

 

History

History
59 lines (32 loc) · 3.92 KB

DOCKER.md

File metadata and controls

59 lines (32 loc) · 3.92 KB

Install Docker

Before start, install the Docker for this practice, see the references here about how to install the Docker for different platforms.

Install Docker on Windows

Below is the guide especially for Windows as the macOS one is very easy and straightforward:

  1. In order to use Docker, disable Hyper-v by using cmd (Windows 10 only):

    bcdedit /set hypervisorlaunchtype off

    In case you want to re-enable it after practice, here is the command:

    bcdedit /set hypervisorlaunchtype auto

  2. Install the Docker Toolbox, and make sure the Virtualization is enabled on Windows. You can read this for reference, then click on Get Docker Toolbox for Windows to start downloading the installer.

  3. After installing the Docker Toolbox, click the Quick Start Terminal on the desktop. If you have passed previous 2 steps, you will see a page for downloading one boot2docker.iso file. You can manually download and put it into C:\Users\your_username\.docker\machine\cache folder. (Copy the boot2docker.iso from the USB provided on the class)

  4. You can close the Quick Start Terminal window, then use cmd (refer to Build Docker image section on this page). Run a command:

    docker-machine ls

Then you should be able to see the default virtual machine.

  1. Run docker-machine env default command. It will show some information about your environment. Choose the last row and run it manually. Then you will be able to run Docker in your cmd window, so here are the commands you need to execute:

    docker-machine env default

    @FOR /f "TOKENS=*" %i IN ('docker-machine env default') DO %i

    Docker

  2. Remember the IP address in 2nd line as on Windows, you will use it to access the application you're deploying on Docker.

You cannot just use localhost to access the service. Use the IP instead. The reason is there is a boot2docker VM running by VMBox. Docker connect with the VM directly. The IP is for the VM.

  • Note: You can use Virtual Box to check your docker-machine instance. If you are experiencing the VT-x problem, please enable the Virtualization in the BIOS, read the docs below about how to enable virtualization:

    Docker Docker

If there is an error of "this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot", please follow this guide

Install Docker on macOS

  • Please refer the doc here

  • Find Docker app in the macOS's Launchpad, then click on it to start it

    Docker Docker started

Stop here and follow the Blockchain practice first.

Please read this reference carefully, and finish the Blockchain practice.