当前位置: 首页>编程语言>正文

【打工日常】云原生之部署个人使用的高速下载器Gopeed

一、Gopeed介绍

1.Gopeed简介

Gopeed(全称 Go Speed),直译过来中文名叫做够快下载器(不是狗屁下载器!),是一款由 Golang + Flutter 开发的高速下载器,支持(HTTP、BitTorrent、Magnet)协议下载,并且支持所有平台使用。支持的平台:Windows,Macos,Linux,Android,iOS,Web,Docker,命令行。

2.Gopeed基本功能

HTTP & HTTPS 多协程下载
Torrent & Magnet 下载
每日自动更新 tracker 列表
Seed, DHT, PEX, uTP, Webtorrent, Upnp
国际化
暗黑主题

3.项目地址

https://docs.gopeed.com/zh/

二、本次实践介绍

1. 本次实践简介

a.本次实践部署环境为个人腾讯云的测试环境,若是生产环境请谨慎部署;

b.本次实践为快速使用docker部署Gopeed于个人腾讯云上。

2. 本地环境规划
本次实践环境规划:下载镜像Gopeed,通过docker-cli或者docker compose启动容器

镜像命名

IP地址

容器镜像版本

操作系统版本

gopeed

43.138.153.157

latest

centos7

三、检查本地Docker环境

1. 检查本地Docker版本
检查Docker版本:docker version    

[root@VM-8-12-centos docker-compose]# docker version
Client: Docker Engine - Community
 Version:           26.0.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        d260a54
 Built:             Thu Apr 11 10:56:30 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.0.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       60b9add
  Built:            Thu Apr 11 10:55:26 2024
  OS/Arch:          linux/amd64
  Experimental:     false
d:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0  

2. 检查Docker服务状态
检查Docker服务状态,确保Docker服务正常运行。

docker version    

[root@VM-8-12-centos docker-compose]# docker version
Client: Docker Engine - Community
 Version:           26.0.1
 API version:       1.45
 Go version:        go1.21.9
 Git commit:        d260a54
 Built:             Thu Apr 11 10:56:30 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.0.1
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.9
  Git commit:       60b9add
  Built:            Thu Apr 11 10:55:26 2024
  OS/Arch:          linux/amd64
  Experimental:     false
d:
  Version:          1.6.31
  GitCommit:        e377cd56a71523140ca6ae87e30244719194a521
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
[root@VM-8-12-centos docker-compose]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2024-04-16 12:52:35 CST; 6 days ago
     Docs: https://docs.docker.com
 Main PID: 1423 (dockerd)
    Tasks: 96
   Memory: 325.0M
   CGroup: /system.slice/docker.service
           ├─ 1423 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
           ├─ 1919 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6379 -container-ip 172.20.0.3 -container-port 6379
           ├─ 1925 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 6379 -container-ip 172.20.0.3 -container-port 6379
           ├─ 1939 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3307 -container-ip 172.20.0.4 -container-port 3306
           ├─ 1945 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 3307 -container-ip 172.20.0.4 -container-port 3306
           ├─ 3105 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 8080 -container-ip 172.20.0.6 -container-port 3000
           ├─ 3111 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 8080 -container-ip 172.20.0.6 -container-port 3000
           ├─ 7776 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 6389 -container-ip 172.20.0.5 -container-port 3000
           ├─ 7781 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 6389 -container-ip 172.20.0.5 -container-port 3000
           ├─12090 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 1288 -container-ip 172.20.0.7 -container-port 8080
           ├─12095 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 1288 -container-ip 172.20.0.7 -container-port 8080
           ├─23800 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 80 -container-ip 172.20.0.2 -container-port 80
           └─23806 /usr/bin/docker-proxy -proto tcp -host-ip :: -host-port 80 -container-ip 172.20.0.2 -container-port 80

Apr 21 17:22:45 VM-8-12-centos dockerd[1423]: time="2024-04-21T17:22:45.025665322+08:00" level=error msg="[resolver] failed to query external DNS serve...Apr 21 17:22:49 VM-8-12-centos dockerd[1423]: time="2024-04-21T17:22:49.026714634+08:00" level=error msg="[resolver] failed to query external DNS serve...Apr 21 17:22:50 VM-8-12-centos dockerd[1423]: time="2024-04-21T17:22:50.276218127+08:00" level=error msg="[resolver] failed to query external DNS serve...Apr 21 17:22:54 VM-8-12-centos dockerd[1423]: time="2024-04-21T17:22:54.277221448+08:00" level=error msg="[resolver] failed to query external DNS serve...Apr 21 17:24:48 VM-8-12-centos dockerd[1423]: time="2024-04-21T17:24:48.494298386+08:00" level=info msg="ignoring event"=d88bf968f647...kDelete"Apr 21 22:25:07 VM-8-12-centos dockerd[1423]: time="2024-04-21T22:25:07.888659304+08:00" level=info msg="ignoring event"=d88bf968f647...kDelete"Apr 22 19:34:46 VM-8-12-centos dockerd[1423]: time="2024-04-22T19:34:46.261208371+08:00" level=info msg="ignoring event"=2995fd2067c2...kDelete"Apr 22 19:34:46 VM-8-12-centos dockerd[1423]: time="2024-04-22T19:34:46.289007775+08:00" level=warning msg="ShouldRestart failed, will not be...Apr 22 19:36:18 VM-8-12-centos dockerd[1423]: 2024/04/22 19:36:18 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/...p.go:98)Apr 22 20:04:27 VM-8-12-centos dockerd[1423]: 2024/04/22 20:04:27 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/...p.go:98)

四、部署Gopeed镜像

1.下载Gopeed

docker pull liwei2633/gopeed

[root@VM-8-12-centos ~]# docker pull liwei2633/gopeed
Using default tag: latest
latest: Pulling from liwei2633/gopeed
a0d0a0d46f8b: Pull complete 
5ab954482b28: Pull complete 
461329800ee5: Pull complete 
1e5442dfb50f: Pull complete 
b2c1712b0f0e: Pull complete 
Digest: sha256:139a9493a62d4d4693fcfd2bc079382792dfc2d0b5d5b5ac20874ba44fb5dc15
Status: Downloaded newer image for liwei2633/gopeed:latest
docker.io/liwei2633/gopeed:latest
  
2.docker-compose启动文件

version: '3.9'
services:
    gopeed:
        image: liwei2633/gopeed
        ports:
            - '12633:9999'
       _name: gopeed

    
3.docker-cli启动
    
docker run --name gopeed -d -p 12633:9999 liwei2633/gopeed

4.启动docker-compose

docker compose up -d  

5.查Gopeed容器状态  

docker ps |grep  gopeed
    
[root@VM-8-12-centos docker-compose]# docker ps |grep  gopeed
b4cc8056be4a   liwei2633/gopeed                "./entrypoint.sh"        6 minutes ago   Up 
minutes          0.0.0.0:12633->9999/tcp, :::12633->9999/tcp            gopeed

6.查Gopeed日志状态

docker logs -f gopeed

[root@VM-8-12-centos docker-compose]# docker logs -f gopeed

  _______   ______   .______    _______  _______  _______
 /  _____| /  __  \  |   _  \  |   ____||   ____||       \
|  |  __  |  |  |  | |  |_)  | |  |__   |  |__   |  .--.  |
|  | |_ | |  |  |  | |   ___/  |   __|  |   __|  |  |  |  |
|  |__| | |  `--'  | |  |      |  |____ |  |____ |  '--'  |
 \______|  \______/  | _|      |_______||_______||_______/

Server start success on http://[::]:9999

六、访问Gopeed首页

注:云服务器记得放开防火墙!
访问地址https://43.138.153.157:12633/,欢迎点击玩一下!

【打工日常】云原生之部署个人使用的高速下载器Gopeed,【打工日常】云原生之部署个人使用的高速下载器Gopeed_docker,第1张

【打工日常】云原生之部署个人使用的高速下载器Gopeed,【打工日常】云原生之部署个人使用的高速下载器Gopeed_Docker_02,第2张

【打工日常】云原生之部署个人使用的高速下载器Gopeed,【打工日常】云原生之部署个人使用的高速下载器Gopeed_docker_03,第3张

【打工日常】云原生之部署个人使用的高速下载器Gopeed,【打工日常】云原生之部署个人使用的高速下载器Gopeed_centos_04,第4张



https://www.xamrdz.com/lan/5yp1935516.html

相关文章: