利用ssh实现免密登录
获取docker-machine
进行创建操作(redhat需要进入/etc/os-release中改变ID)
docker-machine create --driver generic --generic-ip-address=172.25.33.1 server1
docker-machine create --driver generic --generic-ip-address=172.25.33.2 server2
docker-machine create --driver generic --generic-ip-address=172.25.33.3 server3
切换命令
eval $(docker-machine env server1)
添加命令行识别
导入文件
cat .bashrc |tail -1
PS1='[\u@\h \W$(__docker_machine_ps1)]\$ '
source .bashrc
切换尝试
docker-machine use server3
docker-machine use -u