bi4nbn/sing-box

By bi4nbn

Updated 12 months ago

非Sing-Box官方编译

Image
Networking
1

10K+

bi4nbn/sing-box repository overview

镜像特点

latest (main-next branch / Latest-release)

  • 包括的tags: with_quic,with_grpc,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor

dev-next (dev-next branch / Pre-release)

  • 包括的tags: with_quic,with_grpc,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor

特定版本号

  • 包括的tags: with_quic,with_grpc,with_dhcp,with_wireguard,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor

支持的架构

  • linux/i386
  • linux/amd64
  • linux/arm/v7
  • linux/arm64

Docker Compose 启动示例

  version: "3"
  services:
    sing-box:
      image: bi4nbn/sing-box:latest
      container_name: sing-box
      restart: always
      network_mode: host
      cap_add:
        - NET_ADMIN
        - NET_BIND_SERVICE
        - SYS_PTRACE
        - DAC_READ_SEARCH
      devices:
        - /dev/net/tun:/dev/net/tun
      volumes:
        - /etc/sing-box/:/etc/sing-box/
      command: -D /etc/sing-box/ -C /etc/sing-box/ run
      deploy:
        resources:
          limits:
            cpus: '0.80'
            memory: 500M
  

简单的Docker Compose指令

  • 停止: docker compose down 或 docker compose -f /you/path/docker-compose.yml down
  • 更新: docker compose pull 或 docker compose -f /you/path/docker-compose.yml pull
  • 启动: docker compose up -d 或 docker compose -f /you/path/docker-compose.yml up -d (deploy字段不生效)
  • docker compose --compatibility up -d 或 docker compose -f /you/path/docker-compose.yml --compatibility up -d (deploy字段生效)

Docker Compose 启动示例字段解析

  • image: bi4nbn/sing-box:latest 拉取镜像
  • container_name: sing-box 设置容器的名称为 sing-box
  • restart: always 指定容器在停止时总是重新启动
  • network_mode: host 共享主机的网络命名空间
  • 添加权限:
    • NET_ADMIN: 允许进行网络配置,包括设置网络接口、配置防火墙规则等
    • NET_BIND_SERVICE: 允许绑定到低于 1024 端口的能力
    • SYS_PTRACE: 允许使用 ptrace 系统调用
    • DAC_READ_SEARCH: 允许读取不属于自己的文件,以及在目录中搜索,前提是对该目录拥有执行权限
  • 设备挂载: /dev/net/tun:/dev/net/tun: 将主机的 /dev/net/tun 目录挂载到容器内的相同路径
  • 卷挂载: /etc/sing-box/:/etc/sing-box/
  • 命令: -D /etc/sing-box/ -C /etc/sing-box/ run

Tag summary

Content type

Image

Digest

sha256:aa89217bd

Size

16.8 MB

Last updated

12 months ago

docker pull bi4nbn/sing-box:v1.11.15