xugd/openwrt-pi5

By xugd

Updated over 1 year ago

树莓派5openwrt

Image
Networking
Web servers
Web analytics
0

1.1K

xugd/openwrt-pi5 repository overview

openwrt Docker 镜像

本镜像基于 ImmortalWrt 23.05分支,每日1点通过GitHub Actions自动构建推送至本仓库。


功能特点

  • 预装软件包:openclash、passwall、smartDNS、v2rayA 等。
  • 平台支持:支持 ARM 平台(树莓派4、5)。
  • 快速部署:无需手动编译,直接通过 Docker 拉取镜像即可使用。
  • 集成工具
    • Oh-My-Zsh 终端体验。
    • 预装开发者工具(如 tmux、vim、wget 等)。
  • 持续更新:通过 GitHub Actions 实现每日构建,始终保持最新版本。

使用方法

开启宿主机网卡混杂模式
sudo ip link set eth0 promisc on
创建macvlan模式的虚拟网络

自行修改网段、网关

sudo docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eth0 openwrtNet
运行容器

建议使用docker compose: 示例:

services:
  openwrt:
    image: xugd/openwrt-pi5:latest
    container_name: openwrt
    restart: always
    network_mode: openwrtNet
    privileged: true
    command: /sbin/init
    volumes:
      - openwrt:/etc
volumes:
  openwrt:
修改容器IP、网关
docker exec -it openwrt /bin/sh
vi /etc/config/network

示例:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.1.105'
        option gateway '192.168.1.103'
        option dns '192.168.1.103'
        option device 'br-lan'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0'
  • ipaddr:你要分配的容器IP,不能与网络下其他设备/容器冲突
  • netmask:子网掩码一般为255.255.255.0
  • gateway:硬网关,通常是你家光猫路由器地址
  • dns:DNS服务器,设置硬网关地址

重启网络:

/etc/init.d/network restart

访问你分配的容器IP,例如http://192.168.1.105,进入openwrt主页面

源代码与构建

本镜像基于 GitHub Actions 自动构建,您可以在 GitHub 仓库中找到源代码并查看构建过程。


贡献指南

欢迎任何形式的贡献!如果您发现问题或有改进建议,请通过以下方式联系我:

  1. GitHub Issues 中提交问题。
  2. 提交 Pull Request 为项目贡献代码。

许可证

本项目使用 GPL License 授权,详情请参阅 LICENSE


鸣谢

Tag summary

Content type

Image

Digest

sha256:0fb1d7498

Size

85.2 MB

Last updated

over 1 year ago

docker pull xugd/openwrt-pi5