In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about how to manage Machine. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something from this article.
The process of creating machine with docker-machine is simple and suitable for multi-host environments. In addition, Docker Machine also provides some subcommands to facilitate the management of machine. The most common of these is the ability to perform docker-related operations without logging in to machine.
As we learned earlier, to execute a remote docker command, we need to specify the connection string of the target host through-H, such as:
Docker-H tcp://192.168.56.105:2376 ps
Docker Machine makes the process easier. Docker-machine env host1 displays all the environment variables required to access host1:
When prompted, execute eval $(docker-machine env host1):
Then you can see that the command prompt has changed because we previously configured PS1=' [\ u@\ h\ W$ (_ _ docker_machine_ps1)]\ $'in $HOME/.bashrc to display the current docker host.
All docker commands executed in this state have the same effect as on host1, such as starting a busybox container:
Execute eval $(docker-machine env host2) to switch to host2:
Here are a few more useful docker-machine subcommands:
Docker-machine upgrade updates the docker of machine to the latest version, which can be executed in batches:
Docker-machine config views the docker daemon configuration of machine:
Stop/start/restart is an operating system operation on machine, not stop/start/restart docker daemon.
Docker-machine scp can copy files between different machine, such as:
Docker-machine scp host1:/tmp/a host2:/tmp/b
It can be seen that Docker Machine can greatly improve the efficiency in the multi-host environment, and the operation is very simple.
After reading the above, do you have any further understanding of how to manage Machine? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.