CentOS7安装STF,Docker版本
前提条件[已安装Docker](docker images)验证[root@bogon ~]# docker versionClient:Version:1.13.1API version:1.26Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64Go version:go1.10.3Git commit:0be3e21/
·
本次安装红框部分
前提条件
已安装Docker
验证
[root@bogon ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
Go version: go1.10.3
Git commit: 0be3e21/1.13.1
Built: Thu Nov 12 15:11:46 2020
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-203.git0be3e21.el7.centos.x86_64
Go version: go1.10.3
Git commit: 0be3e21/1.13.1
Built: Thu Nov 12 15:11:46 2020
OS/Arch: linux/amd64
Experimental: false
[root@bogon ~]# docker-compose --version
docker-compose version 1.29.2, build 5becea4c
CentOS7安装STF
1、拉取依赖镜像
[root@bogon ~]# sudo docker pull sorccu/adb:latest
[root@bogon ~]# sudo docker pull rethinkdb:latest
[root@bogon ~]# sudo docker pull openstf/stf:latest
# 实际只用到了前3个
[root@bogon ~]# sudo docker pull openstf/ambassador:latest
[root@bogon ~]# sudo docker pull nginx:latest
2、检查已经拉取的镜像
[root@bogon ~]# sudo docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/nginx latest 04661cdce581 29 hours ago 141 MB
docker.io/rethinkdb latest 2a54dcb95502 2 weeks ago 131 MB
docker.io/openstf/ambassador latest 938a816f078a 15 months ago 8.63 MB
docker.io/openstf/stf latest 91d0ab894aff 15 months ago 958 MB
docker.io/sorccu/adb latest 7123ee61b746 3 years ago 30.5 MB
3、启动容器:Rethinkdb,报错找问题1
带挂载-v /srv/rethinkdb:/data报错
sudo docker run -d --name rethinkdb -v /srv/rethinkdb:/data --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
不带挂载,成功启动
[root@bogon /]# sudo docker run -d --name rethinkdb --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
a4bfb45049e46068c5c9282f9de59e54500005f57ef9a637d7639cf01b848177
[root@bogon /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a4bfb45049e4 rethinkdb "rethinkdb --bind ..." 5 seconds ago Up 4 seconds rethinkdb
4、启动容器:ADB
[root@bogon ~]# sudo docker run -d --name adbd --privileged -v /dev/bus/usb:/dev/bus/usb --net host sorccu/adb:latest
7098cb22d6871f0a1cc95ae52886a57161fe2af4213f984b0f4f3a540d26e723
[root@bogon /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3b7be288d1ff sorccu/adb:latest "/sbin/tini -- adb..." 4 seconds ago Up 2 seconds adbd
a4bfb45049e4 rethinkdb "rethinkdb --bind ..." 41 seconds ago Up 40 seconds rethinkdb
5、启动容器:STF
192.168.111.129为服务机的 IP
[root@bogon /]# sudo docker run -d --name stf --net host openstf/stf stf local --public-ip 192.168.111.129 --allow-remote
f349984bf935eb1d89d46a5dcc9430535f2b4b50736418291cdf223614649a5e
[root@bogon /]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f349984bf935 openstf/stf "stf local --publi..." 4 seconds ago Up 2 seconds stf
3b7be288d1ff sorccu/adb:latest "/sbin/tini -- adb..." 22 seconds ago Up 20 seconds adbd
a4bfb45049e4 rethinkdb "rethinkdb --bind ..." 59 seconds ago Up 58 seconds rethinkdb
6、浏览器访问 STF 服务
在浏览器中输入http://192.168.111.129:7100就可以打开网页,随便输入姓名和一个邮箱,就可以登录
链接手机
遇到问题1
启动不起来
[root@bogon ~]# sudo docker run -d --name rethinkdb -v /srv/rethinkdb:/data --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
587a9853cd82fe6a40939928d3a34155e4caf5a85679fa6707b5fa5ba6e3f57c
[root@bogon ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@bogon ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
587a9853cd82 rethinkdb "rethinkdb --bind ..." 45 seconds ago Exited (1) 45 seconds ago rethinkdb
[root@bogon ~]# docker logs -f 587a9853cd82
Could not create directory 'rethinkdb_data': Permission denied
解决问题:不带挂载 -v /srv/rethinkdb:/data
原因:无法创建目录“数据库数据”:权限被拒绝
[root@bogon ~]# sudo docker run -d --name rethinkdb --net host rethinkdb rethinkdb --bind all --cache-size 8192 --http-port 8090
更多推荐
已为社区贡献5条内容
所有评论(0)