Docker Machine快速安装Docker环境(二)
来源:互联网 发布:淘宝新款男士长袖衬衣 编辑:程序博客网 时间:2024/06/06 10:48
1
2
3
4
5
6
7
8
9
10
Error creating machine: Error running provisioning: Something went wrong running an SSH
command
!
command
:
sudo
hostname
ubuntu &&
echo
"ubuntu"
|
sudo
tee
/etc/hostname
err :
exit
status 1
output :
sudo
: no
tty
present and no askpass program specified
Sorry, try again.
sudo
: no
tty
present and no askpass program specified
Sorry, try again.
sudo
: no
tty
present and no askpass program specified
Sorry, try again.
sudo
: 3 incorrect password attempts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Creating CA:
/root/
.docker
/machine/certs/ca
.pem
Creating client certificate:
/root/
.docker
/machine/certs/cert
.pem
Running pre-create checks...
Creating machine...
(18.5) No SSH key specified. Connecting to this machine now and
in
the future will require the
ssh
agent to contain the appropriate key.
Waiting
for
machine to be running, this may take a few minutes...
Machine is running, waiting
for
SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Installing Docker...
Copying certs to the
local
machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: docker-machine
env
ubuntu
1
2
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
18.252 - generic Running tcp:
//192
.168.18.252:2376 v1.9.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
if
[ $USER !=
"root"
];
then
echo
"Please use root account operation or sudo!"
exit
fi
if
! $(
which
expect >
/dev/null
);
then
apt-get
install
expect -y
fi
# 设置SSH允许root远程登录
sed
-r -i
's/(PermitRootLogin).*/\1 yes/'
/etc/ssh/sshd_config
service
ssh
restart >
/dev/null
# 设置root用户密码
while
true
;
do
read
-p
"Please enter you account to set the root password: "
ROOT_PASS
if
[ -n
"$ROOT_PASS"
];
then
break
else
echo
"Password can not be empty!"
continue
fi
done
expect -c "
spawn
passwd
root
expect {
\"Enter new UNIX password:\" {send \"$ROOT_PASS\r\"; exp_continue}
\"Retype new UNIX password:\" {send \"$ROOT_PASS\r\"}
}
expect eof
#文件结束
" >
/dev/null
echo
"The root account password is: $ROOT_PASS"
help 查看帮助信息
active 查看活动的Docker主机
config 输出连接的配置信息
create 创建一个Docker主机
env 显示连接到某个主机需要的环境变量
inspect 输出主机更新信息
ip 获取Docker主机地址
kill 停止某个Docker主机
ls 列出所有管理的Docker主机
regenerate-certs 为某个主机重新成功TLS认证信息
restart 重启Docker主机
rm 删除Docker主机
scp 在Docker主机之间复制文件
ssh SSH到主机上执行命令
start 启动一个主机
status 查看一个主机状态
stop 停止一个主机
upgrade 更新主机Docker版本为最新
url 获取主机的URL
0 0
- Docker Machine快速安装Docker环境(二)
- Docker Machine快速安装Docker环境(二)
- Docker教程(二) Docker环境安装
- CentOs安装Docker,docker machine
- 【Docker】通过Docker-Machine安装Docker
- 安装 Docker Machine
- docker-machine的安装
- 安装 Docker Machine
- docker和docker-machine的安装
- Docker实战(十一):Docker安装ELK环境(二)
- Docker实战(十一):Docker安装ELK环境(二)
- Docker实战(十一):Docker安装ELK环境(二)
- Win7 64bit环境下,Docker-Machine安装
- 使用Docker Machine安装UCP
- Docker vs Docker-machine
- Docker Machine
- Docker快速安装部署
- Docker快速安装部署
- android自定义View的实现原理
- POJ 2387
- Docker集群管理之Docker Machine
- hibernate中对象的状态解析
- JavaScript 事件
- Docker Machine快速安装Docker环境(二)
- 原码、补码、反码详解
- HTK学习笔记 (1)
- 树莓派3串口使用问题的解决方法
- Docker介绍与安装使用(一)
- SDUTACM 二叉排序树
- Docker数据持久化与容器迁移(三)
- 关于获取dialog中edittext的值问题
- 项目经理应该知道的97件事--避免打地鼠式开发