Docker Ethereum client
Publish: 2021-05-06 00:00:43
1. Unknown_Error
2. Installation steps
Step 1:
first, download the latest Windows docker client. The latest version is v.1.0.0, which is an EXE file. Double click to run it
Step 2:
execute the installation file
in the installation process, click next. In step 3, you can see that the actual installation content includes three parts: the first is the script and virtual machine of docker under windows, the second is the VirtualBox of Oracle, and the third is msys, which is one of the best GNU environments under Windows
check here to install all. After the next step, wait for the end of the installation, and the installation program prompts to restart. In order to ensure the success of the installation and avoid accidents, restart here
Step 3:
by default, two shortcuts, docker client and VirtualBox, will be generated on the desktop. Double click the docker client, and boot2docker VM will be installed in VirtualBox at the first run time. After the installation is successful, boot2docker VM will be automatically started (there is no need for users to manually start boot2docker VM in VirtualBox every time, After the docker client is executed, the virtual machine starts automatically
possible problems in the installation process:
boot2docker VM is not running may appear on the client ring the first startup, which indicates that there is a problem in the installation of the virtual machine. You can try to start it manually in VirtualBox
at this time, VirtualBox will report an error with the error code of E_ Fail (0x80004005), prompt "cannot open a new task for boot2docker VM"
the reason for the error is that the host computer's Intel virtual technology is not turned on
the solution is to restart the computer, enter the BIOS interface before starting the system, and start Intel virtual technology (different BIOS systems are in different locations, but they are similar)
Exit BIOS, save the settings, restart the machine, and start the docker client again
docker's Hello World
Step 1:
before running and using docker, first create a docker account so that you can use docker hub. Docker hub is the core library of docker, which helps to manage docker and its components. It also provides primary image, user authorization, automatic image, workflow tools such as build triggers and web hooks, and integration of GitHub and bitbucket. You can directly log in to the official website of docker to register an account, or directly register through the command
$sudo docker login
Step 2:
simply output the command of Hello World
$sudo docker run ubuntu:14.04 /bin/echo ' Hello World'
when using this command for the first time, docker will check out the image of Ubuntu (docker image of Ubuntu) from the cloud to the local
this command completes a simple function, but the work done by the docker kernel includes checking out the dependency image, creating and destroying the container, etc.
Step 1:
first, download the latest Windows docker client. The latest version is v.1.0.0, which is an EXE file. Double click to run it
Step 2:
execute the installation file
in the installation process, click next. In step 3, you can see that the actual installation content includes three parts: the first is the script and virtual machine of docker under windows, the second is the VirtualBox of Oracle, and the third is msys, which is one of the best GNU environments under Windows
check here to install all. After the next step, wait for the end of the installation, and the installation program prompts to restart. In order to ensure the success of the installation and avoid accidents, restart here
Step 3:
by default, two shortcuts, docker client and VirtualBox, will be generated on the desktop. Double click the docker client, and boot2docker VM will be installed in VirtualBox at the first run time. After the installation is successful, boot2docker VM will be automatically started (there is no need for users to manually start boot2docker VM in VirtualBox every time, After the docker client is executed, the virtual machine starts automatically
possible problems in the installation process:
boot2docker VM is not running may appear on the client ring the first startup, which indicates that there is a problem in the installation of the virtual machine. You can try to start it manually in VirtualBox
at this time, VirtualBox will report an error with the error code of E_ Fail (0x80004005), prompt "cannot open a new task for boot2docker VM"
the reason for the error is that the host computer's Intel virtual technology is not turned on
the solution is to restart the computer, enter the BIOS interface before starting the system, and start Intel virtual technology (different BIOS systems are in different locations, but they are similar)
Exit BIOS, save the settings, restart the machine, and start the docker client again
docker's Hello World
Step 1:
before running and using docker, first create a docker account so that you can use docker hub. Docker hub is the core library of docker, which helps to manage docker and its components. It also provides primary image, user authorization, automatic image, workflow tools such as build triggers and web hooks, and integration of GitHub and bitbucket. You can directly log in to the official website of docker to register an account, or directly register through the command
$sudo docker login
Step 2:
simply output the command of Hello World
$sudo docker run ubuntu:14.04 /bin/echo ' Hello World'
when using this command for the first time, docker will check out the image of Ubuntu (docker image of Ubuntu) from the cloud to the local
this command completes a simple function, but the work done by the docker kernel includes checking out the dependency image, creating and destroying the container, etc.
3. There are three tasks involved. The first one, jar, creates an executable schelerjar file including dependency. Before creating the docker image, we need to the jar file to the build / docker folder. Replication depends on the second task. Because of the stripped relationship, the CMD in dockerfile has always been java-jarelasticsearch-mesos-scheler.jar. The third task is to run docker. Here is the dockerbuildimage type, the dependency from the second task, setting inputdir and linking to docker_ Host or use socket to link.
4. Let's learn about docker in Windows operating system and the knowledge of installing docker Windows client in it. Docker engine uses the unique kernel features of Linux, so it can't run through the windows kernel. Therefore, docker engine creates a small virtual system to run Linux and uses its resources and kernel. In this way, the windows docker client can use the virtual docker engine to build, run and manage the docker container. A team called boot2docker has developed an application with the same name. It creates a virtual machine to run tiny core Linux based Linux and run docker container on windows. It runs completely in memory, requires about 27m of memory and can be started in 5 seconds (depending on indivial). Therefore, before the docker engine for windows was developed, we could only run Linux container in windows machine
here are the simple steps to install the docker client and run the container on it
1. Download boot2docker
before we start the installation, we need the boot2docker executable. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file named docker-install.exe from that page using our favorite browser or download manager
2. Install boot2docker
now we run the installation file, which will install the window docker client, GIT (msys GIT) for windows, VirtualBox, boot2docker Linux ISO and boot2docker management tools, which are very important for running the full-featured docker engine out of the box
3. Run boot2docker
after installing the necessary components, we start boot2docker from the "boot2docker start" shortcut on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine
check to confirm the configuration of docker version command on the running surface
docker version
4. Run docker
since boot2docker start has set the environment variable shell, I started to use docker. Please note that I want boot2docker as the remote docker daemon, and add sudo before the docker command
now let me try the image of Hello world to load the mirror of Hello world Like running and inputting & quot; Hello from Docker" Information
$docker run Hello World
5. Use the command prompt (CMD) to run docker
now I want to start using the command prompt and use docker to call the command prompt (CMD. Exe). Since boot2docker requires ssh.exe path, I need the command prompt to input the command to make the% path% environment variable include git installation directory bin folder
set path =% path%& quot; c:\ Program Files (x86)\ Git\ bin"
run command I run boot2docker start from the command prompt to start boot2docker virtual machine
boot2docker start
note: look at the machine does no exist error message, run boot2docker init command
diagram control logo command cmd.exe console window to set environment variables I run docker container horizontally
6
to run docker with PowerShell, I need to open the PowerShell window and add the ssh.exe path variable
$env: path = & quot${ Env:Path}; c:\ Program Files (x86)\ Git\ bin"
after running the command, I need to run
boot2docker start
print the command used to set the environment variables, connect to the virtual machine, run docker PowerShell command internally, I need to run some commands from PowerShell, run docker container horizontally
7. Log in with putty
boot2docker% userprofile%. SSH directory is used to log in public private key, I need to use file The private key needs to be converted into putty format. I use puttygen.exe to implement
I need to type puttygen.exe and% userprofile%. SSH & # 92; id_ Boot2docker Import & quot; File"-& gt;& quot; Load" Menu) Click & quot; Save Private Key" Saving files with putty [email protected] : 2022 login
8. Boot2docker options
boot2docker management tool provides some commands as shown in
$boot2docker
usage: boot2docker.exe [& lt; options>]{ help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version}[< args>]
summary
through docker Windows client, using docker boot2docker management tool can make any docker container run smoothly like a Linux host. Stick application can be found more carefully. The default user name of boot2docker is docker password tcuser. The new version of boot2docker can set host only network adapter to provide access to container port, like 192.168.59.103 through VirtualBox D Change in HCP
here are the simple steps to install the docker client and run the container on it
1. Download boot2docker
before we start the installation, we need the boot2docker executable. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file named docker-install.exe from that page using our favorite browser or download manager
2. Install boot2docker
now we run the installation file, which will install the window docker client, GIT (msys GIT) for windows, VirtualBox, boot2docker Linux ISO and boot2docker management tools, which are very important for running the full-featured docker engine out of the box
3. Run boot2docker
after installing the necessary components, we start boot2docker from the "boot2docker start" shortcut on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine
check to confirm the configuration of docker version command on the running surface
docker version
4. Run docker
since boot2docker start has set the environment variable shell, I started to use docker. Please note that I want boot2docker as the remote docker daemon, and add sudo before the docker command
now let me try the image of Hello world to load the mirror of Hello world Like running and inputting & quot; Hello from Docker" Information
$docker run Hello World
5. Use the command prompt (CMD) to run docker
now I want to start using the command prompt and use docker to call the command prompt (CMD. Exe). Since boot2docker requires ssh.exe path, I need the command prompt to input the command to make the% path% environment variable include git installation directory bin folder
set path =% path%& quot; c:\ Program Files (x86)\ Git\ bin"
run command I run boot2docker start from the command prompt to start boot2docker virtual machine
boot2docker start
note: look at the machine does no exist error message, run boot2docker init command
diagram control logo command cmd.exe console window to set environment variables I run docker container horizontally
6
to run docker with PowerShell, I need to open the PowerShell window and add the ssh.exe path variable
$env: path = & quot${ Env:Path}; c:\ Program Files (x86)\ Git\ bin"
after running the command, I need to run
boot2docker start
print the command used to set the environment variables, connect to the virtual machine, run docker PowerShell command internally, I need to run some commands from PowerShell, run docker container horizontally
7. Log in with putty
boot2docker% userprofile%. SSH directory is used to log in public private key, I need to use file The private key needs to be converted into putty format. I use puttygen.exe to implement
I need to type puttygen.exe and% userprofile%. SSH & # 92; id_ Boot2docker Import & quot; File"-& gt;& quot; Load" Menu) Click & quot; Save Private Key" Saving files with putty [email protected] : 2022 login
8. Boot2docker options
boot2docker management tool provides some commands as shown in
$boot2docker
usage: boot2docker.exe [& lt; options>]{ help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version}[< args>]
summary
through docker Windows client, using docker boot2docker management tool can make any docker container run smoothly like a Linux host. Stick application can be found more carefully. The default user name of boot2docker is docker password tcuser. The new version of boot2docker can set host only network adapter to provide access to container port, like 192.168.59.103 through VirtualBox D Change in HCP
5. Here are the simple steps to install the docker client and run the container on it
1. Download boot2docker
before we start the installation, we need the boot2docker executable. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file named docker-install.exe from that page using our favorite browser or download manager
2. Install boot2docker
now we run the installation file, which will install the window docker client, GIT (msys GIT) for windows, VirtualBox, boot2docker Linux ISO and boot2docker management tools, which are very important for running full-featured docker engine out of the box
3. Run boot2docker
after installing the necessary components, we start boot2docker from the "boot2docker start" shortcut on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine
to check whether the configuration is correct, run the following docker version command
docker version
4. Running docker
since boot2docker start automatically starts a shell that has set environment variables correctly, we can start using docker immediately. Please note that if we want to use boot2docker as a remote docker daemon, do not add sudo before the docker command
now, let's try the Hello world example image, which will download the Hello world image, run and output & quot; Hello from Docker" Information
$docker run Hello World
5. Run docker from the command prompt (CMD)
now, if you want to start using docker from the command prompt, you can open the command prompt (CMD. Exe). Since boot2docker requires ssh.exe to be in path, we need to enter the following command in the command prompt to make the bin folder under git installation directory included in the% path% environment variable.
1. Download boot2docker
before we start the installation, we need the boot2docker executable. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file named docker-install.exe from that page using our favorite browser or download manager
2. Install boot2docker
now we run the installation file, which will install the window docker client, GIT (msys GIT) for windows, VirtualBox, boot2docker Linux ISO and boot2docker management tools, which are very important for running full-featured docker engine out of the box
3. Run boot2docker
after installing the necessary components, we start boot2docker from the "boot2docker start" shortcut on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine
to check whether the configuration is correct, run the following docker version command
docker version
4. Running docker
since boot2docker start automatically starts a shell that has set environment variables correctly, we can start using docker immediately. Please note that if we want to use boot2docker as a remote docker daemon, do not add sudo before the docker command
now, let's try the Hello world example image, which will download the Hello world image, run and output & quot; Hello from Docker" Information
$docker run Hello World
5. Run docker from the command prompt (CMD)
now, if you want to start using docker from the command prompt, you can open the command prompt (CMD. Exe). Since boot2docker requires ssh.exe to be in path, we need to enter the following command in the command prompt to make the bin folder under git installation directory included in the% path% environment variable.
6. 1. Download boot2docker. Before we start the installation, we need the executable file of boot2docker. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file named docker-install.exe from that page using our favorite browser or download manager. 2. Install boot2docker. Now we run the installation file, which will install the windowdocker client, GIT (msys GIT) for windows, VirtualBox, boot2docker linuxiso and boot2docker management tools, which are very important for running the full-featured docker engine out of the box. 3. After running boot2docker and installing the necessary components, we start boot2docker from the shortcut "boot2dockerstart" on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine. To check the correct configuration, run the following docker version command. Docker version 4. Run docker. Since boot2dockerstart automatically starts a shell with environment variables set correctly, we can start using docker immediately. Please note that if we want to use boot2docker as a remote docker daemon, do not add sudo before the docker command. Now, let's try the Hello world example image, which will download the Hello world image, run and output & quot; HellofromDocker" Information$ Use command prompt (CMD) to run docker. Now, if you want to start using docker with command prompt, you can open command prompt (CMD. Exe). Since boot2docker requires ssh.exe to be in path, we need to enter the following command in the command prompt to make the bin folder under git installation directory included in the% path% environment variable. setPATH=%PATH%;& quot; c:\ ProgramFiles(x86)\ Git\ bin" After running the above command, we can run boot2dockerstart from the command prompt to start boot2docker virtual machine. Note: if you see the error message of machine do not exist, run the boot2dockerinit command. Then the console command in the figure above to cmd.exe to set environment variables for the console window, and then we can run the docker container as usual. 6. To run docker in PowerShell, we need to start a PowerShell window and add ssh.exe to the path variable$ After en runs the above command, we also need to run boot2dockerstart, which will print the PowerShell command for setting environment variables to connect to the docker running inside the virtual machine. We just need to run these commands in PowerShell to run the docker container as usual. 7. Logging into boot2docker with putty will generate and use public and private keys for login in% userprofile%. SSH directory. We also need to use the private key in this folder. The private key needs to be converted to putty format. We can implement it through puttygen.exe. We need to open puttygen.exe and start from% userprofile%. SSH & # 92; id_ Import from boot2docker; File"-& gt;& quot; Load" Menu), and then click & quot; SavePrivateKey" And then use the saved file through putty [email protected] : 2022 login. 8. Boot2docker option boot2docker management tool provides some commands, as shown below$ boot2dockerU sage:boot2docker.exe [] {help | init | up | SSH | save | down | poweroff | reset | restart | config | status | info | IP | shellinit | delete | download | upgrade | version} [] it is interesting to use docker through docker Windows client. Boot2docker management tool is a great application that can make any docker container run smoothly like a Linux host. If you are more careful, you will find that the default user name of boot2docker is docker and the password is tcuser. The latest version of boot2docker sets up a host only network adapter to provide the port to access the container. Generally speaking, it is 192.168.59.103, but it can be changed through DHCP of VirtualBox.
7. 1. Download boot2docker. Before we start the installation, we need the executable file of boot2docker. You can download the latest version of boot2docker from its GitHub. In this guide, we download version v1.6.1 from the website. We downloaded a file called docker-install.exe. 2. Install boot2docker. Now we run the installation file, which will install the windows docker client, GIT (msys GIT), VirtualBox, boot2docker Linux ISO and boot2docker management tools. 3. After running boot2docker installation, we start boot2docker from the "boot2docker start" shortcut on the desktop. It will ask you to enter an SSH key for later verification. A configured UNIX shell is then launched to manage dockers running in the virtual machine. To check whether the configuration is correct, run the docker version command. 4. Run docker. Since boot2docker start automatically starts a shell that has set environment variables, we can start using docker immediately. Note that if you want to use boot2docker as a remote docker daemon, do not add sudo before the docker command. Now, let's try the Hello world example image, which will download the Hello world image, run and output & quot; Hello from Docker" Information$ docker run hello-world
8. Happiness is the warm embrace of mother, the affectionate embrace of lover, the selfless care of friends, and the friendly praise of the world.
9. Before compiling docker code, it is necessary to study the code structure of docker and the officially recommended method. Because docker is open source, many third-party developers participate. Then the official will certainly give the development environment to build the document, so get the code must first study the official compilation method. Through the documents and code, we know that the official recommendation of docker is to build the environment and compile in the container of docker itself. What the official gives is a dockerfile based on Ubuntu.
10. Install docker on CentOS or Fedora
to install docker on CentOS, first enable the EPEL software library, and then use the yum command:
$sudo Yum install docker IO
$sudo service docker start
$sudo chkconfig Docker on
to install docker on Fedora, Use the following commands:
$sudo Yum install docker IO
$sudo systemctl start docker. Service
$sudo systemctl enable docker. Service
after installing docker on CentOS or Fedora, you need to add yourself to the docker group so that you can run docker as a non root user. To do this, use this command:
$sudo usermod - A - G docker $user
to exit and log in again to activate the group change
at this point, you should be able to run the docker command as an unprivileged user
basic usage of docker
if you want to start a new docker container, you need to determine which docker image to use for the container. You can search the official docker image index (), which lists publicly available docker images. Docker index includes: Linux basic images managed by docker team (such as Ubuntu, Debian, Fedora and CentOS), and user-defined images (such as mysql, redis and WordPress)
for example, if you want to open an Ubuntu container in interactive mode, you need to run the following command. As soon as the container is started, the last variable "/ bin / bash" is executed in the container
$docker run - I - t Ubuntu / bin / bash
the first time you run the above command, it will download one or more available images of Ubuntu docker over the network, and then use the images to start the docker container. The Ubuntu container will start immediately, and you will see the console prompt in the container. You can access the fully functional Ubuntu operating system in the sandbox
if you type "exit" at the prompt, the container will exit and the container will be stopped
to list all containers (including stopped containers), run this command:
$docker PS - a
container ID image command created status ports names
6a0b2bb4c ubuntu:14.04 /bin/bash About a minute ago Exit 0 cocky_ Ritchie
want to restart a stopped container in daemon mode:
$docker start [container ID]
want to remove a stopped container:
$docker RM [container ID]
want to connect to a container running in the background, To view or interact with containers:
$docker attach [container ID]
you can customize a running container (such as installing new software). If you want to save the changes in the current container, first type "exit" at the prompt to exit the interactive mode of the container. Then use this command to save the changed image as a different image:
$docker commit [container ID] [new image name]
to get the container ID of your container, you can use the "docker PS – a" command described earlier
once you have built a new image like this, you can start a new container with that image
you can also download any public container images (such as Ubuntu, Bowery / MySQL) and save them to the local software library, as shown below<
$docker pull [image name]
to view all locally downloaded / saved container images:
$docker images
you can choose which specific image to start the container from:
$docker run - I - t [image ID] / bin / bash
to remove a container image from the local software library:
$docker RMI [image ID]
to Install to CentOS or Fedora
to install docker to CentOS, first enable the EPEL software library, and then use the yum command:
$sudo Yum install docker IO
$sudo service docker start
$sudo chkconfig docker on
to install docker to Fedora, use the following commands:
$sudo Yum install docker io
to install docker on CentOS, first enable the EPEL software library, and then use the yum command:
$sudo Yum install docker IO
$sudo service docker start
$sudo chkconfig Docker on
to install docker on Fedora, Use the following commands:
$sudo Yum install docker IO
$sudo systemctl start docker. Service
$sudo systemctl enable docker. Service
after installing docker on CentOS or Fedora, you need to add yourself to the docker group so that you can run docker as a non root user. To do this, use this command:
$sudo usermod - A - G docker $user
to exit and log in again to activate the group change
at this point, you should be able to run the docker command as an unprivileged user
basic usage of docker
if you want to start a new docker container, you need to determine which docker image to use for the container. You can search the official docker image index (), which lists publicly available docker images. Docker index includes: Linux basic images managed by docker team (such as Ubuntu, Debian, Fedora and CentOS), and user-defined images (such as mysql, redis and WordPress)
for example, if you want to open an Ubuntu container in interactive mode, you need to run the following command. As soon as the container is started, the last variable "/ bin / bash" is executed in the container
$docker run - I - t Ubuntu / bin / bash
the first time you run the above command, it will download one or more available images of Ubuntu docker over the network, and then use the images to start the docker container. The Ubuntu container will start immediately, and you will see the console prompt in the container. You can access the fully functional Ubuntu operating system in the sandbox
if you type "exit" at the prompt, the container will exit and the container will be stopped
to list all containers (including stopped containers), run this command:
$docker PS - a
container ID image command created status ports names
6a0b2bb4c ubuntu:14.04 /bin/bash About a minute ago Exit 0 cocky_ Ritchie
want to restart a stopped container in daemon mode:
$docker start [container ID]
want to remove a stopped container:
$docker RM [container ID]
want to connect to a container running in the background, To view or interact with containers:
$docker attach [container ID]
you can customize a running container (such as installing new software). If you want to save the changes in the current container, first type "exit" at the prompt to exit the interactive mode of the container. Then use this command to save the changed image as a different image:
$docker commit [container ID] [new image name]
to get the container ID of your container, you can use the "docker PS – a" command described earlier
once you have built a new image like this, you can start a new container with that image
you can also download any public container images (such as Ubuntu, Bowery / MySQL) and save them to the local software library, as shown below<
$docker pull [image name]
to view all locally downloaded / saved container images:
$docker images
you can choose which specific image to start the container from:
$docker run - I - t [image ID] / bin / bash
to remove a container image from the local software library:
$docker RMI [image ID]
to Install to CentOS or Fedora
to install docker to CentOS, first enable the EPEL software library, and then use the yum command:
$sudo Yum install docker IO
$sudo service docker start
$sudo chkconfig docker on
to install docker to Fedora, use the following commands:
$sudo Yum install docker io
Hot content
