diff --git a/.github/workflows/openwrt-lede-x86.yml b/.github/workflows/openwrt-lede-x86.yml index db0610f..8e14c01 100644 --- a/.github/workflows/openwrt-lede-x86.yml +++ b/.github/workflows/openwrt-lede-x86.yml @@ -3,7 +3,7 @@ name: OpenWRT LEDE X86 on: workflow_dispatch: schedule: - - cron: '59 4,12,20 * * *' + - cron: '1 4,12,20 * * *' env: DOCKERFILE: openwrt/lede/x86/Dockerfile.openwrt-lede-x86 diff --git a/.github/workflows/openwrt-r4s.yml b/.github/workflows/openwrt-r4s.yml new file mode 100644 index 0000000..3a4c30e --- /dev/null +++ b/.github/workflows/openwrt-r4s.yml @@ -0,0 +1,59 @@ +name: OpenWRT R4s + +on: + workflow_dispatch: + schedule: + - cron: '16 4,12,20 * * *' + +env: + DOCKERFILE: openwrt/openwrt/r4s/Dockerfile.openwrt-r4s + REGION: cn-beijing + REGISTRY: registry.cn-beijing.aliyuncs.com + NAMESPACE: licsber + REPOSITORY: github + TAG: openwrt-r4s + TAG_FULL: openwrt-r4s-${{ github.run_id }} + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Save space + env: + DEBIAN_FRONTEND: noninteractive + run: | + docker rmi `docker images -q` + sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android + sudo -E rm -rf /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" /opt/ghc + sudo -E apt update -y + sudo -E apt -y purge azure-cli* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap* + sudo -E systemctl daemon-reload + sudo -E apt -y autoremove --purge + sudo -E apt clean + sudo -E timedatectl set-timezone "Asia/Shanghai" + df -h + + - name: Checkout V4 + uses: actions/checkout@v4 + + - name: Login to ACR V1 + uses: aliyun/acr-login@v1 + with: + login-server: "https://${{ env.REGISTRY }}" + username: "${{ secrets.ACR_USERNAME }}" + password: "${{ secrets.ACR_PASSWD }}" + region-id: "${{ env.REGION }}" + + - name: Build Image + id: build + run: | + IMAGE=${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.REPOSITORY }} + echo "image=$IMAGE" >> $GITHUB_OUTPUT + cd `dirname "${{ env.DOCKERFILE }}"` + docker build -t "$IMAGE:${{ env.TAG }}" --file `basename ${{ env.DOCKERFILE }}` . + + - name: Push Image + run: | + docker push "${{ steps.build.outputs.image }}:${{ env.TAG }}" + docker tag "${{ steps.build.outputs.image }}:${{ env.TAG }}" "${{ steps.build.outputs.image }}:${{ env.TAG_FULL }}" + docker push "${{ steps.build.outputs.image }}:${{ env.TAG_FULL }}" diff --git a/.github/workflows/openwrt-x86.yml b/.github/workflows/openwrt-x86.yml index f68422c..a38e6ac 100644 --- a/.github/workflows/openwrt-x86.yml +++ b/.github/workflows/openwrt-x86.yml @@ -3,7 +3,7 @@ name: OpenWRT X86 on: workflow_dispatch: schedule: - - cron: '59 4,12,20 * * *' + - cron: '31 4,12,20 * * *' env: DOCKERFILE: openwrt/openwrt/x86/Dockerfile.openwrt-x86 diff --git a/openwrt/lede/ct6-x86/Dockerfile.openwrt-lede-ct6-x86 b/openwrt/lede/ct6-x86/Dockerfile.openwrt-lede-ct6-x86 index 2975224..7948720 100644 --- a/openwrt/lede/ct6-x86/Dockerfile.openwrt-lede-ct6-x86 +++ b/openwrt/lede/ct6-x86/Dockerfile.openwrt-lede-ct6-x86 @@ -2,14 +2,16 @@ FROM registry.cn-beijing.aliyuncs.com/licsber/github:openwrt-lede-env LABEL org.opencontainers.image.authors='licsber' USER licsber -WORKDIR /home/licsber/lede +WORKDIR /mnt/licsber/lede RUN rm -rf bin +RUN git pull + +COPY --chown=licsber openwrt.lede.ct6.x86.config .config RUN ./scripts/feeds update -a && \ ./scripts/feeds install -a -COPY --chown=licsber openwrt.lede.ct6.x86.config .config RUN make defconfig && \ make download -j8 diff --git a/openwrt/lede/ct6-x86/openwrt.lede.ct6.x86.config b/openwrt/lede/ct6-x86/openwrt.lede.ct6.x86.config index 4d233ae..5446158 100644 --- a/openwrt/lede/ct6-x86/openwrt.lede.ct6.x86.config +++ b/openwrt/lede/ct6-x86/openwrt.lede.ct6.x86.config @@ -80,4 +80,4 @@ CONFIG_PACKAGE_python3-pyserial=y # 中电安科 CONFIG_PACKAGE_iptables-mod-nfqueue=y CONFIG_PACKAGE_kmod-nfnetlink-queue=y -CONFIG_PACKAGE_kmod-br-netfilter=y +CONFIG_PACKAGE_kmod-br-netfilter=y \ No newline at end of file diff --git a/openwrt/lede/env/Dockerfile.openwrt-lede-env b/openwrt/lede/env/Dockerfile.openwrt-lede-env index 4d827b7..4709823 100644 --- a/openwrt/lede/env/Dockerfile.openwrt-lede-env +++ b/openwrt/lede/env/Dockerfile.openwrt-lede-env @@ -18,28 +18,27 @@ RUN lscpu && \ rm -rf /var/lib/apt/list/* && \ screenfetch -RUN useradd -c 'licsber user' -m -d /home/licsber -s /bin/bash licsber +RUN useradd -c 'licsber user' -m -d /mnt/licsber -s /bin/bash licsber RUN usermod -aG sudo licsber RUN echo 'licsber ALL=(ALL)NOPASSWD:ALL' >> /etc/sudoers USER licsber -WORKDIR /home/licsber +WORKDIR /mnt/licsber RUN git clone https://github.com/coolsnowwolf/lede.git -RUN cd lede && \ - ./scripts/feeds update -a && \ +WORKDIR /mnt/licsber/lede + +COPY --chown=licsber banner package/base-files/files/etc/banner + +RUN ./scripts/feeds update -a && \ ./scripts/feeds install -a -RUN cd lede && \ - make defconfig && \ +RUN make defconfig && \ make download -j8 -COPY --chown=licsber banner lede/package/base-files/files/etc/banner +RUN make -j3 || make V=s -RUN cd lede && \ - make -j3 || make V=s - -RUN tree -h lede/bin +RUN tree -h bin CMD ["echo", "Hello from LicsberLab!~"] diff --git a/openwrt/lede/env/banner b/openwrt/lede/env/banner index 7f0e047..b5060ce 100644 --- a/openwrt/lede/env/banner +++ b/openwrt/lede/env/banner @@ -6,5 +6,5 @@ |______|_|\___|___/_.__/ \___|_| |______\__,_|_.__/ ------------------------------------------------------ - %D %V, %C + LicsberLab@2024 %D %V, %C ------------------------------------------------------ diff --git a/openwrt/lede/x86/Dockerfile.openwrt-lede-x86 b/openwrt/lede/x86/Dockerfile.openwrt-lede-x86 index 6ee89da..b1201e1 100644 --- a/openwrt/lede/x86/Dockerfile.openwrt-lede-x86 +++ b/openwrt/lede/x86/Dockerfile.openwrt-lede-x86 @@ -2,11 +2,12 @@ FROM registry.cn-beijing.aliyuncs.com/licsber/github:openwrt-lede-env LABEL org.opencontainers.image.authors='licsber' USER licsber -WORKDIR /home/licsber/lede +WORKDIR /mnt/licsber/lede RUN rm -rf bin -COPY --chown=licsber openwrt.lede.x86.config .config +RUN git pull +COPY --chown=licsber openwrt.lede.x86.config .config RUN sed -i 's/coolsnowwolf\/packages/licsber\/packages/g' feeds.conf.default RUN ./scripts/feeds update -a && \ diff --git a/openwrt/lede/x86/openwrt.lede.x86.config b/openwrt/lede/x86/openwrt.lede.x86.config index 582b79e..3f7fdd7 100644 --- a/openwrt/lede/x86/openwrt.lede.x86.config +++ b/openwrt/lede/x86/openwrt.lede.x86.config @@ -81,4 +81,4 @@ CONFIG_PACKAGE_luci-app-socat=y # 运营商羊毛也得薅呀 CONFIG_PACKAGE_luci-app-mwan3=y CONFIG_PACKAGE_luci-app-mwan3helper=y -CONFIG_PACKAGE_luci-app-syncdial=y +CONFIG_PACKAGE_luci-app-syncdial=y \ No newline at end of file diff --git a/openwrt/openwrt/env/Dockerfile.openwrt-env b/openwrt/openwrt/env/Dockerfile.openwrt-env index 7cc2942..8e7c97f 100644 --- a/openwrt/openwrt/env/Dockerfile.openwrt-env +++ b/openwrt/openwrt/env/Dockerfile.openwrt-env @@ -12,28 +12,27 @@ RUN lscpu && \ rm -rf /var/lib/apt/list/* && \ screenfetch -RUN useradd -c 'licsber user' -m -d /home/licsber -s /bin/bash licsber +RUN useradd -c 'licsber user' -m -d /mnt/licsber -s /bin/bash licsber RUN usermod -aG sudo licsber RUN echo 'licsber ALL=(ALL)NOPASSWD:ALL' >> /etc/sudoers USER licsber -WORKDIR /home/licsber +WORKDIR /mnt/licsber RUN git clone https://github.com/openwrt/openwrt.git -RUN cd openwrt && \ - ./scripts/feeds update -a && \ - ./scripts/feeds install -a - -RUN cd openwrt && \ - make defconfig && \ - make download -j8 +WORKDIR /mnt/licsber/openwrt COPY --chown=licsber banner package/base-files/files/etc/banner -RUN cd openwrt && \ - make -j3 || make V=s +RUN ./scripts/feeds update -a && \ + ./scripts/feeds install -a -RUN tree -h openwrt/bin +RUN make defconfig && \ + make download -j8 + +RUN make -j3 || make V=s + +RUN tree -h bin CMD ["echo", "Hello from LicsberLab!~"] diff --git a/openwrt/openwrt/env/banner b/openwrt/openwrt/env/banner index 7f0e047..b5060ce 100644 --- a/openwrt/openwrt/env/banner +++ b/openwrt/openwrt/env/banner @@ -6,5 +6,5 @@ |______|_|\___|___/_.__/ \___|_| |______\__,_|_.__/ ------------------------------------------------------ - %D %V, %C + LicsberLab@2024 %D %V, %C ------------------------------------------------------ diff --git a/openwrt/openwrt/r4s/Dockerfile.openwrt-r4s b/openwrt/openwrt/r4s/Dockerfile.openwrt-r4s new file mode 100644 index 0000000..a71759c --- /dev/null +++ b/openwrt/openwrt/r4s/Dockerfile.openwrt-r4s @@ -0,0 +1,28 @@ +FROM registry.cn-beijing.aliyuncs.com/licsber/github:openwrt-env +LABEL org.opencontainers.image.authors='licsber' + +USER licsber +WORKDIR /mnt/licsber/openwrt + +RUN rm -rf bin +RUN git pull + +COPY --chown=licsber openwrt.r4s.config .config + +RUN ./scripts/feeds update -a && \ + ./scripts/feeds install -a + +RUN make defconfig && \ + make download -j8 + +RUN sed -i 's/192.168.1.1/10.24.4.1/g' package/base-files/files/bin/config_generate +RUN sed -i "s/hostname='OpenWrt'/hostname='LicsberR4S'/g" package/base-files/files/bin/config_generate +RUN sed -i "s/timezone='UTC'/timezone='UTC+8'/g" package/base-files/files/bin/config_generate + +ENV GOPROXY='https://goproxy.io,direct' +RUN if [ `nproc` -le 4 ]; then make -j3 || make V=s; else make -j `nproc` || make V=s; fi && \ + echo $? + +RUN tree -h bin + +CMD ["echo", "Hello from LicsberLab!~"] diff --git a/openwrt/openwrt/r4s/Dockerfile.openwrt.r4s b/openwrt/openwrt/r4s/Dockerfile.openwrt.r4s deleted file mode 100644 index f743cd1..0000000 --- a/openwrt/openwrt/r4s/Dockerfile.openwrt.r4s +++ /dev/null @@ -1,39 +0,0 @@ -FROM ubuntu:jammy-20230308 -LABEL maintainer=admin@licsber.site - -ENV TERM=xterm -ENV FORCE_UNSAFE_CONFIGURE=1 - -# https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem -# https://github.com/coolsnowwolf/lede -RUN echo $(nproc) && \ - apt update > /dev/null && \ - apt install -y -qq build-essential clang flex bison g++ gawk gcc-multilib g++-multilib \ - gettext git libncurses5-dev libssl-dev python3-distutils rsync unzip \ - zlib1g-dev file wget \ - mkisofs libelf-dev > /dev/null && \ - apt clean > /dev/null && \ - rm -rf /var/lib/apt/list/* - -WORKDIR /licsber - -RUN git clone --depth=1 https://github.com/openwrt/openwrt.git -b openwrt-22.03 -RUN git clone --depth=1 https://github.com/fw876/helloworld.git && \ - cp -r helloworld openwrt/package - -RUN cd openwrt && \ - ./scripts/feeds update -a && \ - ./scripts/feeds install -a - -COPY openwrt-config/openwrt.r4s.config openwrt/.config -RUN cd openwrt && \ - make defconfig - -RUN cd openwrt && \ - make download -j8 - -RUN cd openwrt && \ - make -j4 || make -j1 V=s && \ - echo $? - -CMD bash diff --git a/openwrt/openwrt/r4s/openwrt.r4s.config b/openwrt/openwrt/r4s/openwrt.r4s.config index 4468ce7..b293204 100644 --- a/openwrt/openwrt/r4s/openwrt.r4s.config +++ b/openwrt/openwrt/r4s/openwrt.r4s.config @@ -1,84 +1,3 @@ CONFIG_TARGET_rockchip=y CONFIG_TARGET_rockchip_armv8=y -CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s=y -CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s="" -CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y -CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s="" -CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_pine64_rockpro64=y -CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_pine64_rockpro64="" -CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_radxa_rock-pi-4a=y -CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_radxa_rock-pi-4a="" -CONFIG_ALL_KMODS=y -CONFIG_ALL_NONSHARED=y -CONFIG_DEVEL=y -CONFIG_TARGET_PER_DEVICE_ROOTFS=y -CONFIG_AUTOREMOVE=y -CONFIG_BPF_TOOLCHAIN_BUILD_LLVM=y -# CONFIG_BPF_TOOLCHAIN_NONE is not set -CONFIG_BUILDBOT=y -CONFIG_COLLECT_KERNEL_DEBUG=y -CONFIG_HAS_BPF_TOOLCHAIN=y -CONFIG_IB=y -CONFIG_IMAGEOPT=y -CONFIG_KERNEL_BUILD_DOMAIN="buildhost" -CONFIG_KERNEL_BUILD_USER="builder" -# CONFIG_KERNEL_KALLSYMS is not set -CONFIG_MAKE_TOOLCHAIN=y -CONFIG_PACKAGE_cgi-io=y -CONFIG_PACKAGE_libbpf=m -CONFIG_PACKAGE_libelf=m -CONFIG_PACKAGE_libiwinfo=y -CONFIG_PACKAGE_libiwinfo-data=y -CONFIG_PACKAGE_libiwinfo-lua=y -CONFIG_PACKAGE_liblua=y -CONFIG_PACKAGE_liblucihttp=y -CONFIG_PACKAGE_liblucihttp-lua=y -CONFIG_PACKAGE_libubus-lua=y -CONFIG_PACKAGE_lua=y -CONFIG_PACKAGE_luci=y -CONFIG_PACKAGE_luci-app-firewall=y -CONFIG_PACKAGE_luci-app-opkg=y -CONFIG_PACKAGE_luci-base=y -CONFIG_PACKAGE_luci-lib-base=y -CONFIG_PACKAGE_luci-lib-ip=y -CONFIG_PACKAGE_luci-lib-jsonc=y -CONFIG_PACKAGE_luci-lib-nixio=y -CONFIG_PACKAGE_luci-mod-admin-full=y -CONFIG_PACKAGE_luci-mod-network=y -CONFIG_PACKAGE_luci-mod-status=y -CONFIG_PACKAGE_luci-mod-system=y -CONFIG_PACKAGE_luci-proto-ipv6=y -CONFIG_PACKAGE_luci-proto-ppp=y -CONFIG_PACKAGE_luci-ssl=y -CONFIG_PACKAGE_luci-theme-bootstrap=y -CONFIG_PACKAGE_px5g-wolfssl=y -CONFIG_PACKAGE_qosify=m -CONFIG_PACKAGE_rpcd=y -CONFIG_PACKAGE_rpcd-mod-file=y -CONFIG_PACKAGE_rpcd-mod-iwinfo=y -CONFIG_PACKAGE_rpcd-mod-luci=y -CONFIG_PACKAGE_rpcd-mod-rrdns=y -CONFIG_PACKAGE_tc-full=m -CONFIG_PACKAGE_tc-mod-iptables=m -CONFIG_PACKAGE_uhttpd=y -CONFIG_PACKAGE_uhttpd-mod-ubus=y -CONFIG_PACKAGE_zlib=m -CONFIG_REPRODUCIBLE_DEBUG_INFO=y -CONFIG_SDK=y -CONFIG_SDK_LLVM_BPF=y -CONFIG_TARGET_ALL_PROFILES=y -CONFIG_USE_LLVM_BUILD=y -CONFIG_VERSIONOPT=y -CONFIG_VERSION_BUG_URL="" -CONFIG_VERSION_CODE="" -CONFIG_VERSION_DIST="OpenWrt" -CONFIG_VERSION_FILENAMES=y -CONFIG_VERSION_HOME_URL="" -CONFIG_VERSION_HWREV="" -CONFIG_VERSION_MANUFACTURER="" -CONFIG_VERSION_MANUFACTURER_URL="" -CONFIG_VERSION_NUMBER="" -CONFIG_VERSION_PRODUCT="" -CONFIG_VERSION_REPO="https://downloads.openwrt.org/releases/22.03.3" -CONFIG_VERSION_SUPPORT_URL="" +CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y \ No newline at end of file diff --git a/openwrt/openwrt/x86/Dockerfile.openwrt-x86 b/openwrt/openwrt/x86/Dockerfile.openwrt-x86 index b618b03..754660f 100644 --- a/openwrt/openwrt/x86/Dockerfile.openwrt-x86 +++ b/openwrt/openwrt/x86/Dockerfile.openwrt-x86 @@ -2,9 +2,11 @@ FROM registry.cn-beijing.aliyuncs.com/licsber/github:openwrt-env LABEL org.opencontainers.image.authors='licsber' USER licsber -WORKDIR /home/licsber/openwrt +WORKDIR /mnt/licsber/openwrt RUN rm -rf bin +RUN git pull + COPY --chown=licsber openwrt.x86.config .config RUN ./scripts/feeds update -a && \ @@ -14,7 +16,7 @@ RUN make defconfig && \ make download -j8 RUN sed -i 's/192.168.1.1/10.24.0.10/g' package/base-files/files/bin/config_generate -RUN sed -i "s/hostname='OpenWrt'/hostname='LicsberLEDE'/g" package/base-files/files/bin/config_generate +RUN sed -i "s/hostname='OpenWrt'/hostname='LicsberOP'/g" package/base-files/files/bin/config_generate RUN sed -i "s/timezone='UTC'/timezone='UTC+8'/g" package/base-files/files/bin/config_generate ENV GOPROXY='https://goproxy.io,direct' diff --git a/openwrt/openwrt/x86/openwrt.x86.config b/openwrt/openwrt/x86/openwrt.x86.config index 0e51e7d..6d81f34 100644 --- a/openwrt/openwrt/x86/openwrt.x86.config +++ b/openwrt/openwrt/x86/openwrt.x86.config @@ -1,10 +1,33 @@ # 大大大 -CONFIG_TARGET_ROOTFS_PARTSIZE=1024 +CONFIG_TARGET_ROOTFS_PARTSIZE=2048 + +# IPv6得有吧 +CONFIG_PACKAGE_ipv6helper=y +CONFIG_PACKAGE_ip6tables-extra=y +CONFIG_PACKAGE_ip6tables-mod-nat=y # 路由器不带Docker叫什么路由器 CONFIG_PACKAGE_luci-app-dockerman=y CONFIG_PACKAGE_docker-compose=y +# 后台跑点东西不过分吧 +CONFIG_PACKAGE_screen=y + +# 挂一个机械盘不过分吧 +CONFIG_PACKAGE_luci-app-hd-idle=y + +# 机械盘有了再挪点文件吧 +CONFIG_PACKAGE_rsync=y + +# 给硬盘分个区吧 +CONFIG_PACKAGE_fdisk=y + +# 测速得有吧 +CONFIG_PACKAGE_iperf3=y + +# DDNS yyds +CONFIG_PACKAGE_ddns-scripts_cloudflare.com-v4=y + # 来点5G当备份链路 CONFIG_PACKAGE_usb-modeswitch=y CONFIG_PACKAGE_modemmanager=y @@ -21,3 +44,37 @@ CONFIG_PACKAGE_luci-proto-ncm=y CONFIG_PACKAGE_kmod-usb-net-rndis=y # Quectel CONFIG_PACKAGE_quectel-CM-5G=y + +# 不支持Python的路由器不是好路由器 +CONFIG_PACKAGE_python3-pip=y +CONFIG_PACKAGE_python3-requests=y +CONFIG_PACKAGE_python3-speedtest-cli=y + +# Python都有了 再来个Go不过分 +CONFIG_PACKAGE_golang=y + +# 花里胡哨的图表最喜欢啦 +CONFIG_PACKAGE_luci-app-netdata=y + +# OVPN最好用 不接受反驳 +CONFIG_PACKAGE_luci-app-openvpn-server=y + +# 你的路由器炸啦~ +CONFIG_PACKAGE_luci-app-serverchan=y + +# 路由 那路由协议必须得全 +CONFIG_PACKAGE_vxlan=y +CONFIG_PACKAGE_pppossh=y +CONFIG_PACKAGE_gre=y +CONFIG_PACKAGE_xl2tpd=y +CONFIG_PACKAGE_comgt=y + +## Self + +# 我最喜欢的小工具 +CONFIG_PACKAGE_luci-app-socat=y + +# 运营商羊毛也得薅呀 +CONFIG_PACKAGE_luci-app-mwan3=y +CONFIG_PACKAGE_luci-app-mwan3helper=y +CONFIG_PACKAGE_luci-app-syncdial=y \ No newline at end of file