<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
<channel>
<atom:link href="https://www.naline.cn/feed" rel="self" type="application/rss+xml"/>
<title>Naline</title>
<link>https://www.naline.cn</link>
<description>垃圾佬的日常笔记</description>
<language>zh-CN</language>
<copyright>© admin </copyright>
<pubDate>Fri, 17 Apr 2026 19:58:00 GMT</pubDate>
<generator>Mix Space CMS (https://github.com/mx-space)</generator>
<docs>https://mx-space.js.org</docs>
<image>
    <url>https://www.naline.cn/api/v2/objects/avatar/54jcuzg2z2er8fuwht.png</url>
    <title>Naline</title>
    <link>https://www.naline.cn</link>
</image>
<item>
    <title>通过Docker搭建rustDesk服务</title>
    <link>https://www.naline.cn/posts/docker/rustDesk</link>
    <pubDate>Fri, 03 Jan 2025 02:11:44 GMT</pubDate>
    <description>创建目录
mkdir -p /opt/rustdesk/{hbbs,hbbr}/root

拉取镜像</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/docker/rustDesk'>https://www.naline.cn/posts/docker/rustDesk</a></blockquote>
      <h1>创建目录</h1>
<p>mkdir -p /opt/rustdesk/{hbbs,hbbr}/root</p>
<h1>拉取镜像</h1>
<p>docker pull rustdesk/rustdesk-server:latest</p>
<h1>创建并启动容器</h1>
<pre><code class="language-shell"># 启动hbbs -r后为中继服务器地址，如果在公网，需要指定公网地址或私网映射出去的地址，-k 为客户端配置是输入的key，--net=host表示容器应用使用宿主机网络，不需要再进行dockers端口映射，方便。
docker run --restart=always --name hbbs -v /opt/rustdesk/hbbs/root:/root -td --net=host rustdesk/rustdesk-server hbbs -r 192.168.123.124 -k base64xxxxxxxxxxxxxxxxxbase64==

# 启动hbbr
docker run --restart=always --name hbbr -v /opt/rustdesk/hbbr/root:/root -td --net=host rustdesk/rustdesk-server hbbr</code></pre><h1>开放端口</h1>
<ul>
<li>TCP: 21115-21119</li>
<li>UDP: 21116</li>
</ul>

      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/docker/rustDesk#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">67774760af7a66cb3fc29985</guid>
  <category>posts</category>
<category>Docker</category>
 </item>
  <item>
    <title>Docker搭建openWRT，旁路由设置</title>
    <link>https://www.naline.cn/posts/router/docker_openwrt</link>
    <pubDate>Thu, 02 Jan 2025 10:37:11 GMT</pubDate>
    <description>因需要设置成旁路由，需要开启网卡的混杂模式
查看物理网卡名称
ifconfig

我这里是enp1s</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/router/docker_openwrt'>https://www.naline.cn/posts/router/docker_openwrt</a></blockquote>
      <p>因需要设置成旁路由，需要开启网卡的混杂模式</p>
<pre><code class="language-shell"># 查看物理网卡名称
ifconfig

# 我这里是enp1s0
sudo ip link set enp1s0 promisc on

# docker创建macvlan网络，名称为macvlanop，路由器网关为192.168.5.1根据情况修改，--subnet设置为与网关同一网段且为.0/24，桥接模式
docker network create -d macvlan --subnet=192.168.5.0/24 --gateway=192.168.5.1 -o parent=enp1s0 -o macvlan_mode=bridge macvlanop</code></pre><p>下载镜像，我们这里用catwrt</p>
<pre><code class="language-shell">docker pull miaoer/catwrt</code></pre><p>启动容器，网络设置为上面设置的macvlan</p>
<pre><code class="language-shell">docker run -it -d --restart always --network macvlanop --name catwrt --privileged miaoer/catwrt /sbin/init</code></pre><p>进入容器设置网络为静态ip以及作为旁路由</p>
<pre><code class="language-shell"># 进入容器
docker exec -it catwrt /bin/sh

# 修改网络配置
vi /etc/config/network

# 修改为下面配置
option type 'bridge'       #桥接
option ifname 'eth0'		   #网卡名
option proto 'static'		   #静态ip模式
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.5.121'   #openwrt的静态ip
option gateway '192.168.5.1'    #你路由器网关
option dns '192.168.5.1'        #dns

# 重启网络
/etc/init.d/network restart</code></pre><p>因为macvlan的安全机制，此时局域网还是无法访问openwrt的，需要再新增一个macvlan进行桥接，配置宿主机和容器通讯</p>
<pre><code class="language-shell"># 宿主机创建macvlan2桥接到物理网卡
sudo ip link add macvlan2 link enp1s0 type macvlan mode bridge
# 设置macvlan2的ip
sudo ip addr add 192.168.5.240 dev macvlan2
# 启动macvlan2
sudo ip link set macvlan2 up
# 增加路由表，openwrt的ip关联到macvlan2，（多个容器执行下面一句即可）
sudo ip route add 192.168.5.121 dev macvlan2</code></pre><ul>
<li>注意：以上设置重启后会失效，需要重新执行sudo ip route add 192.168.5.121 dev macvlan2</li>
</ul>
<p>以上设置以后，可通过192.168.5.121访问openwrt了</p>
<p>docker重启后无法访问openwt解决方案：
进容器，/etc/config/uhttpd.conf，注释两个443端口监听，再重启/etc/init.d/uhttpd restart</p>

      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/router/docker_openwrt#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">67766c57af7a66cb3fc29411</guid>
  <category>posts</category>
<category>Router</category>
 </item>
  <item>
    <title>Docker操作笔记</title>
    <link>https://www.naline.cn/posts/docker/note</link>
    <pubDate>Thu, 02 Jan 2025 09:47:47 GMT</pubDate>
    <description>修改容器内存占用限制
docker update --memory 500m --memory-sw</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/docker/note'>https://www.naline.cn/posts/docker/note</a></blockquote>
      <pre><code class="language-shell"># 修改容器内存占用限制
docker update --memory 500m --memory-swap -1 &lt;container_name_or_id&gt;
# or
docker update --memory 2G --memory-swap -1 &lt;container_name_or_id&gt;

# 查看容器内存占用
docker stats

# 进入容器
docker exec -it &lt;container_name_or_id&gt; /bin/sh


# 导出备份
```shell
# 将容器生成镜像
docker commit &lt;container_name_or_id&gt; &lt;custom_image_name&gt;
# 将镜像&lt;custom_image_name&gt;导出为tar
docker save -o custom_image.tar &lt;custom_image_name&gt;
# 压缩存档
gzip custom_image.tar
# 导入备份【只能load -i，不能import，否则不能运行】
docker load -i custom_image.tar

# 运行备份镜像
docker run -it -d --restart always --network macvlanop --privileged --name &lt;container_name&gt; &lt;custom_image_name&gt; /sbin/init</code></pre><h1>常规</h1>
<p>docker run -i -t &lt;image_name/continar_id&gt; /bin/bash  启动容器并启动bash（交互方式）</p>
<p>docker run -d -it  image_name   启动容器以后台方式运行(更通用的方式）-t终端 -d后台 </p>
<p>docker ps   列出当前所有正在运行的container</p>
<p>docker ps -a  列出所有的container</p>
<p>docker ps -l   列出最近一次启动的container</p>
<p>docker images  列出本地所有的镜像</p>
<p>docker rmi imagesID   删除指定的镜像id</p>
<p>docker rm CONTAINER ID   删除指定的CONTAINER id</p>
<p>docker diff 镜像名    查看容器的修改部分</p>
<p>docker kill CONTAINER ID   杀掉正在运行的容器</p>
<p>docker logs 容器ID/name   可以查看到容器主程序的输出</p>
<p>docker pull image_name    下载image</p>
<p>docker push image_name   发布docker镜像</p>
<p>docker version   查看docker版本</p>
<p>docker info   查看docker系统的信息</p>
<p>docker inspect 容器的id 可以查看更详细的关于某一个容器的信息</p>
<p>docker run -d  image-name   后台运行镜像</p>
<p>docker search 镜像名    查找公共的可用镜像</p>
<p>docker stop 容器名/容器 ID      终止运行的容器</p>
<p>docker restart 容器名/容器 ID    重启容器</p>
<p>docker commit  提交，创建个新镜像</p>
<p>docker build [OPTIONS] PATH | URL | -   利用 Dockerfile 创建新镜像</p>
<p>docker update --restart=no nginx-web 更新容器自启
```</p>

      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/docker/note#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">677660c3af7a66cb3fc29383</guid>
  <category>posts</category>
<category>Docker</category>
 </item>
  <item>
    <title>网盘搜索神器，搭建aipan服务教程</title>
    <link>https://www.naline.cn/posts/docker/aipan</link>
    <pubDate>Thu, 02 Jan 2025 09:41:00 GMT</pubDate>
    <description>常规操作 Docker换源
vim /etc/docker/daemon.json
替换为如下镜像
</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/docker/aipan'>https://www.naline.cn/posts/docker/aipan</a></blockquote>
      <h1>常规操作 Docker换源</h1>
<pre><code class="language-shell">vim /etc/docker/daemon.json
# 替换为如下镜像
{"registry-mirrors":["https://docker.ketches.cn", "https://dockerpull.org", "https://cjie.eu.org"]}
# 重启服务
sudo systemctl daemon-reload && sudo systemctl restart docker.service</code></pre><h1>创建docker compose</h1>
<pre><code class="language-shell">mkdir /opt/aipan
vim /opt/aipan/docker-compose.yml</code></pre><pre><code class="language-shell">version: '3'

services:
  shiro:
    container_name: aipan
    image: fooololo/aipan-netdisk-search:latest
    restart: always
    ports:
      - 3000:3000</code></pre><h1>启动服务</h1>
<pre><code class="language-shell">docker compose up -d</code></pre><ul>
<li>访问端口3000可自行修改</li>
<li>docker已设置开启自启</li>
</ul>

      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/docker/aipan#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">67765f2caf7a66cb3fc29343</guid>
  <category>posts</category>
<category>Docker</category>
 </item>
  <item>
    <title>网盘神器，搭建Alist教程</title>
    <link>https://www.naline.cn/posts/docker/alist</link>
    <pubDate>Thu, 02 Jan 2025 09:27:44 GMT</pubDate>
    <description>下载程序

创建目录
mkdir /opt/alist

根据系统环境自行选择，我们这里选择64位
</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/docker/alist'>https://www.naline.cn/posts/docker/alist</a></blockquote>
      <h1>下载程序</h1>
<pre><code class="language-shell"># 创建目录
mkdir /opt/alist

# 根据系统环境自行选择，我们这里选择64位
wget https://github.com/AlistGo/alist/releases/download/v3.41.0/alist-linux-amd64.tar.gz

# 解压得到可执行文件 alist
tar -zxvf alist-linux-amd64.tar.gz</code></pre><h1>创建alist服务，方便管理</h1>
<pre><code class="language-shell">vim /etc/systemd/system/alist.service</code></pre><pre><code class="language-shell">[Unit]
Description=Alist service
Wants=network.target
After=network-online.target

[Service]
Type=simple
WorkingDirectory=/opt/alist
ExecStart=/opt/alist/alist server
KillMode=process

[Install]
WantedBy=multi-user.target</code></pre><h1>启动服务</h1>
<pre><code class="language-shell">service alist start

# 自启
systemctl enable alist.service</code></pre><h1>修改密码</h1>
<pre><code class="language-shell">./alist admin set 123456</code></pre><h1>访问</h1>
<p>ip:5244</p>
<h1>WebDav</h1>
<ul>
<li>链接  ip:5244</li>
<li>路径  /dav</li>
<li>账号 admin</li>
<li>密码 123456</li>
</ul>

      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/docker/alist#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">67765c10af7a66cb3fc291f3</guid>
  <category>posts</category>
<category>Docker</category>
 </item>
  <item>
    <title>搭建xiaoya影视库</title>
    <link>https://www.naline.cn/posts/docker/xiaoya</link>
    <pubDate>Fri, 22 Nov 2024 10:45:17 GMT</pubDate>
    <description>切换Docker源
vim /etc/docker/daemon.json
替换为如下镜像
{&quot;re</description>
    <content:encoded><![CDATA[
      <blockquote>该渲染由 marked 生成，可能存在排版问题，最佳体验请前往：<a href='https://www.naline.cn/posts/docker/xiaoya'>https://www.naline.cn/posts/docker/xiaoya</a></blockquote>
      <h1>切换Docker源</h1>
<pre><code class="language-shell">vim /etc/docker/daemon.json
# 替换为如下镜像
{"registry-mirrors":["https://docker.ketches.cn", "https://dockerpull.org", "https://cjie.eu.org"]}
# 重启服务
sudo systemctl daemon-reload && sudo systemctl restart docker.service</code></pre><h1>一键脚本安装</h1>
<pre><code class="language-shell"># 全家桶一键脚本，按指引步骤来即可，支持x86_64和Arm架构机器
bash -c "$(curl --insecure -fsSL https://ddsrem.com/xiaoya_install.sh)"</code></pre><h1>注意事项</h1>
<ul>
<li>阿里云盘已被限制，请配置ali2115.txt，转存为115资源</li>
<li>docker logs xiaoya命令可以查看日志，查看各网盘cookie是否有效</li>
</ul>
<h1>后期升级</h1>
<pre><code class="language-shell">bash -c "$(curl http://docker.xiaoya.pro/update_new.sh)" -s host</code></pre>
      <p style='text-align: right'>
      <a href='https://www.naline.cn/posts/docker/xiaoya#comments'>看完了？说点什么呢</a>
      </p>
    ]]>
    </content:encoded>
  <guid isPermaLink="false">674060bd2441f1f311e613e6</guid>
  <category>posts</category>
<category>Docker</category>
 </item>
  
</channel>
</rss>