Before start, install the Docker for this practice, see the references here about how to install the Docker for different platforms.
Below is the guide especially for Windows as the macOS one is very easy and straightforward:
-
In order to use Docker, disable
Hyper-vby usingcmd(Windows 10 only):bcdedit /set hypervisorlaunchtype offIn case you want to re-enable it after practice, here is the command:
bcdedit /set hypervisorlaunchtype auto -
Install the Docker Toolbox, and make sure the
Virtualizationis enabled onWindows. You can read this for reference, then click onGet Docker Toolbox for Windowsto start downloading the installer. -
After installing the Docker Toolbox, click the
Quick Start Terminalon the desktop. If you have passed previous 2 steps, you will see a page for downloading oneboot2docker.isofile. You can manually download and put it intoC:\Users\your_username\.docker\machine\cachefolder. (Copy theboot2docker.isofrom the USB provided on the class) -
You can close the
Quick Start Terminalwindow, then usecmd(refer toBuild Docker imagesection on this page). Run a command:docker-machine ls
Then you should be able to see the default virtual machine.
-
Run
docker-machine env defaultcommand. 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 yourcmdwindow, so here are the commands you need to execute:docker-machine env default@FOR /f "TOKENS=*" %i IN ('docker-machine env default') DO %i -
Remember the
IP addressin 2nd line as onWindows, 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-machineinstance. If you are experiencing theVT-xproblem, please enable theVirtualizationin the BIOS, read the docs below about how to enable virtualization:
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
-
Please refer the doc here
-
Find
Dockerapp in the macOS's Launchpad, then click on it to start it
Please read this reference carefully, and finish the Blockchain practice.
