Читать книгу Cryptocurrency All-in-One For Dummies - Peter Kent, Kiana Danial - Страница 126

Building your blockchain

Оглавление

You’re going to use the free Docker Desktop tool to build your blockchain. This tool gives you access to a virtual machine, cutting down the time required to set up and debug your system. Because of these features, it lets you create a stable environment for your blockchain, so you don’t have to worry about the settings on your machine, and you can get up and running faster.

Follow these steps:

1 Launch Docker Desktop on your computer. The Docker Desktop application launches a terminal you will use to build your blockchain.

2 Change directories in the terminal to ethereum.The files you create making the new blockchain will go into the desktop file you made in the preceding section. You need to give a command to your computer’s terminal in order to change directories. If you’re on a Mac or running Linux, enter the following command:cd ~/Desktop/ethereum/ethereum-docker/If you’re on a PC, enter the following command:cd ~\Desktop\ethereum\ethereum-docker\ If these commands don’t work for some reason, search the web for tutorials that explain how to change directories for your type of system.Now you can utilize the Ethereum–Docker files.

3 Create one stand-alone Ethereum node by entering the following command into your terminal: docker-compose -f docker-compose-standalone.yml up -dThis one line of code creates the following:One Ethereum bootstrapped containerOne Ethereum container that connects to the bootstrapped containerOne Netstats container with a web UI to view activity in the cluster

4 Take a look at your new blockchain by opening a web browser and going to http://$(docker-machine ip default):3000.

Congratulations! You’ve built your own private blockchain. If you’re so inclined, say a word of thanks to Graham Taylor and Andrew Dong, who put a lot of time into creating the Ethereum–Docker integration.

Cryptocurrency All-in-One For Dummies

Подняться наверх