docker可视化工具Shipyard使用 电脑版发表于:2022/5/26 22:20 ### Docker Shipyard介绍 shipyard是一个开源的docker管理平台,其特性主要包括: tn2>支持节点动态集群,可扩展节点的规模(swarm、etcd方案) 支持镜像管理、容器管理、节点管理等功能 可视化的容器管理和监控管理 在线容器console终端 ![](https://img.tnblog.net/arcimg/aojiancc2/9d50430758d14c1abb7bed07d8dccbe8.png) ### 下载依赖镜像 ``` docker pull rethinkdb docker pull microbox/etcd docker pull shipyard/docker-proxy docker pull swarm docker pull dockerclub/shipyard ``` ### 下载官方脚本 ``` wget https://shipyard-project.com/deploy ``` **若下载失败请使用** ``` wget https://raw.githubusercontent.com/shipyard/shipyard-project.com/master/site/themes/shipyard/static/deploy ``` **若下载失败请使用** ``` wget https://up.fcwys.cc/soft/shipyard.tar.gz ``` ### 解压脚本 ``` tar -xzvf shipyard.tar.gz ``` ### 替换官方脚本 ``` grep -n shipyard:latest deploy sed -i 's/shipyard\/shipyard:latest/dockerclub\/shipyard:latest/g' deploy ``` ### 配置web访问端口 根据需要修改,一般使用默认的就行 ``` #检查8080端口是否被占用,若占用需修改端口 yum install -y net-tools //安装net-tools工具包,若已安装可跳过此步骤 netstat -tlnp | grep 8080 //查看宿主机8080端口是否被占用 ``` 修改配置端口 ``` grep -n 'PORT:-8080' deploy SHIPYARD_PORT=${PORT:-8080} 修改为 SHIPYARD_PORT=${PORT:-指定端口} ``` ### 运行安装脚本 ``` sh deploy ``` **运行成功效果如下:** 可以看到访问地址与用户名密码等信息 ``` [root@docker-learn-swarm-manger shipyard]# sh deploy Unable to find image 'alpine:latest' locally latest: Pulling from library/alpine 59bf1c3509f3: Pulling fs layer 59bf1c3509f3: Verifying Checksum 59bf1c3509f3: Download complete 59bf1c3509f3: Pull complete Digest: sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300 Status: Downloaded newer image for alpine:latest Deploying Shipyard -> Starting Database -> Starting Discovery -> Starting Cert Volume -> Starting Proxy -> Starting Swarm Manager -> Starting Swarm Agent -> Starting Controller Waiting for Shipyard on 192.168.12.246:8080 Shipyard available at http://192.168.12.246:8080 Username: admin Password: shipyard ``` ### 访问与登录 ``` 浏览器输入:http://主机IP:8080 默认账号:admin 默认密码:shipyard ``` 访问成功后就可以看到登录界面: ![](https://img.tnblog.net/arcimg/aojiancc2/52e3e5fbab804b2496b4cf5a7c60251a.png) 要进行管理登录后使用即可 ### 增加一个节点 ``` curl https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://主服务器IP:4001 bash #若下载失败请使用 curl -sSL https://raw.githubusercontent.com/shipyard/shipyard-project.com/master/site/themes/shipyard/static/deploy | ACTION=node DISCOVERY=etcd://主节点IP:4001 bash -s ``` ### 卸载 ``` cat deploy | ACTION=remove bash ``` ### 简单视频说明 链接: https://pan.baidu.com/s/1MDvpXt0QUGqTBb2LUAiqnw?pwd=17qd 提取码: 17qd 复制这段内容后打开百度网盘手机App,操作更方便哦