惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CXSECURITY Database RSS Feed - CXSecurity.com
WordPress大学
WordPress大学
美团技术团队
Last Week in AI
Last Week in AI
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
B
Blog RSS Feed
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
人人都是产品经理
人人都是产品经理
Recorded Future
Recorded Future
The Register - Security
The Register - Security
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
C
Check Point Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Simon Willison's Weblog
Simon Willison's Weblog
T
Troy Hunt's Blog
P
Privacy International News Feed
S
Security Affairs
The Cloudflare Blog
P
Proofpoint News Feed
G
GRAHAM CLULEY
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
D
Docker
S
SegmentFault 最新的问题
N
News | PayPal Newsroom
Cyberwarzone
Cyberwarzone
H
Help Net Security
T
Threatpost
A
About on SuperTechFans
L
LINUX DO - 热门话题
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
N
News and Events Feed by Topic
Attack and Defense Labs
Attack and Defense Labs
M
MIT News - Artificial intelligence
Schneier on Security
Schneier on Security
月光博客
月光博客
F
Fortinet All Blogs
L
Lohrmann on Cybersecurity

Menghuan1918's Blog

提升浏览器多标签页管理效率 介绍页 友链 My Arch Linux - 外观与字体 使用ray.tune进行自动调整超参数 使用Docker(MinIO)和Caddy创建图床服务 AI系统攻击手段(简要概述) RAG预处理增强:让Fastgpt/Dify召回更多东西 将PDF知识图谱化:graphrag+Doc2X+DeepSeek 如虎添翼:为gpt_academic配置searxng搜索 包管理工具UV使用指南:全面替代conda 折腾杂谈:运用Dify+xinference+ollama构建知识库 Ollama跨平台性能比拼:Windows遥遥落后 折腾杂谈:部署一个网页在线状态面板/反代切换到Caddy 笔记软件的最终选择:Obsidian + Self-hosted LiveSync 配置DOSBox以及其窗口大小 在VSCode中配置多平台的C/C++语言支持 折腾杂谈:部署Alist并整合/服务器优化 在Linux上交叉编译出Windows可执行程序 利用MSYS2在windows上配置C/C++/openGL开发环境 强制对游戏应用FSR Speedometer 3.0分数测试(电子斗蛐蛐) 在Arch Linux下编译32位C程序出错 使用pelican以及nginx建立个人博客
折腾杂谈:Docker部署Rustdesk/切换网站框架
Menghuan1918 · 2024-03-23 · via Menghuan1918's Blog

本文内容:

  • 使用Docker部署RustDesk中续
  • 解决阿里云上docker-compose的依赖版本问题
  • 切换网站框架为为vuepress

在服务器上使用Docker部署RustDesk中续

由于我有两台电脑,虽然日常都是通过tailscale穿透后ssh连接,但是总还是偶有需要远程操控的地方。很显然RustDesk提供的服务器就亚洲而言延迟有点高了,因此自己动手部署一个中续服务器。依然在是前文提到的阿里云香港轻量应用服务器,Ubuntu 22.04上部署。

安装Docker

虽然可以选择官方源进行安装.....但是当时用了阿里云镜像进行安装docker(埋坑了):

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io docker-compose

由于我直接用的root用户登录所以并没加sudo。随后找一个你喜欢的地方创建RustDesk的docker-compose.yml文件吧,此处文件参照官方文档:

version: '3'

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: hbbs
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
    image: rustdesk/rustdesk-server:latest
    command: hbbs -r <Your IP>:21117 -k _
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 64M

  hbbr:
    container_name: hbbr
    ports:
      - 21117:21117
    image: rustdesk/rustdesk-server:latest
    command: hbbr -k _
    volumes:
      - ./data:/root
    networks:
      - rustdesk-net
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 64M

此处我添加了-k _以阻止没加密key的用户进行连接

随后cd到响应的地方,docker-compose up -d就可以用了....?

解决依赖问题

随后立即就得到一堆报错,其中最为关键的几处报错为:

TypeError: request() got an unexpected keyword argument 'chunked'
docker.errors.DockerException: Error while fetching server API version: request() got an unexpected keyword argument 'chunked'

随后搜索定位到为这个issue中提到过,原因为pip包requests更新导致的接口变化,后续版本有修复。查看服务器上的docker-compose版本为1.29.2-1.....(是不是有点过于旧了),考虑别的地方暂时也没使用requests,将其降级草草解决问题:

pip install requests<2.2.29

随后再重新启动,这次一切正常了。在RustDesk中填入中续服务器的ip以及id_ed25519.pub作为密匙就好了。

rustdesk连接上中续服务器的样子
rustdesk连接上中续服务器的样子

将网页从pelican切换为vuepress

考虑到前者对markdown的支持实在是有点过于折腾,花了两个多小时切换到了vuepress。效果相当的好!由于两者都是以Markdown为基础,所以迁移过程无非就是改了改配置文件就完了。

除了首页的图标heroImage貌似只能读取svg文件以外...最开始尝试的png图片,老是报错还以为是路径。

就是这样
就是这样

改进的更新脚本

随着写的文章多起来了(指加上这篇水文也才4篇),开始有往文章里面插入图片的需求了。于是在原先的更新脚本中插入了一个对特定文件夹图片进行压缩的脚本。

对这个文件夹中所有文件进行遍历,如有.done结尾的标示文件则代表已经被压缩,如没有则压缩并标记。