n/announcementu/runoneall · 10 个月前
注册 登录
n/announcement · 10 个月前 · 已编辑 · 520 次浏览
u/runoneall王者

ShareNL:使用 HZSG,ISIF 节点的用户请注意

我对宿主机内核参数进行了一些修改,所以你们现在应该可以正常使用 docker,请尝试运行一个 docker 容器,并指定一些端口转发规则,若有错误,请在下方回帖,跟上 docker 启动命令和具体日志信息

若无问题,请回复无问题

6
14
登录后参与讨论。

14 条回复

排序
  1. zhangyx 王者 2 YEARS 10 个月前

    我刚上线,试了下uptime-kuma,还是不行:

    sudo apt-get update
    curl -fsSL https://get.docker.com -o get-docker.sh
    sudo sh get-docker.sh
    sudo systemctl start docker
    sudo systemctl enable docker
    sudo usermod -aG docker $USER
    newgrp docker
    
    mkdir uptime-kuma
    cd uptime-kuma
    curl -o compose.yaml https://raw.githubusercontent.com/louislam/uptime-kuma/master/compose.yaml
    docker compose up -d
    
    root@isif-331f:~/uptime-kuma# docker compose up -d
    [+] up 16/16
    [+] up 18/18islam/uptime-kuma:2 Pulled                                                                                                                                               278.5s 
     ✔ Image louislam/uptime-kuma:2        Pulled                                                                                                                                        278.5s 
       ✔ 66c528ee7b51                      Pull complete                                                                                                                                 275.5s 
       ✔ c236995d12f2                      Pull complete                                                                                                                                  56.8s 
       ✔ ce43fa88f43a                      Pull complete                                                                                                                                  90.6s 
       ✔ ab9c5ae25e4d                      Pull complete                                                                                                                                  79.6s 
       ✔ cc663995c53d                      Pull complete                                                                                                                                  80.7s 
       ✔ 997b350cffa1                      Pull complete                                                                                                                                  80.4s 
       ✔ 17b86553b1c8                      Pull complete                                                                                                                                  92.8s 
       ✔ 5c32499ab806                      Pull complete                                                                                                                                  56.1s 
       ✔ c96d1635ad09                      Pull complete                                                                                                                                  83.4s 
       ✔ fe60297d5e1c                      Pull complete                                                                                                                                  92.9s 
       ✔ b7f9c2a776ef                      Pull complete                                                                                                                                  93.0s 
       ✔ 1cd175334932                      Pull complete                                                                                                                                 233.1s 
       ✔ 485f386a5929                      Pull complete                                                                                                                                 233.4s 
       ✔ 26fe02595b64                      Pull complete                                                                                                                                  83.6s 
       ✔ a4c0464bfa2e                      Download complete                                                                                                                               0.0s 
     ✔ Network uptime-kuma_default         Created                                                                                                                                         0.3s 
     ✔ Container uptime-kuma-uptime-kuma-1 Created                                                                                                                                         0.6s 
    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
    root@isif-331f:~/uptime-kuma# 
    

    错误:
    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 8: permission denied
    守护进程返回错误响应:创建容器任务失败:创建 shim 任务失败:OCI 运行时创建失败:runc 创建失败:无法启动容器进程:容器初始化期间出错:打开 sysctl net.ipv4.ip_unprivileged_port_start 文件失败:重新打开文件描述符 8 失败:权限被拒绝

    1
  2. runoneall 王者 楼主 10 个月前

    那还是有些问题,我再整整

    1
  3. trial 钻石 钻石会员 10 个月前

    OK谢谢

    1
  4. LuffyWang 黄金 2 YEARS 10 个月前

    没有这个小鸡

    0
  5. runoneall 王者 楼主 10 个月前

    isif 现在也可以了

    0
  6. linying23333 😇 钻石 2 YEARS 10 个月前

    runoneall:
    运行一个 docker 容器,并指定一些端口转发规则

    刚试了一下, 依旧不能绑定端口. 绑定无权限, 只能host模式

    root@isif-9471:~/alpine# bash <(curl -sSL https://get.docker.com)
    # Executing docker install script, commit: f381ee68b32e515bb4dc034b339266aff1fbc460
    + sh -c 'apt-get -qq update >/dev/null'
    + sh -c 'DEBIAN_FRONTEND=noninteractive apt-get -y -qq install ca-certificates curl >/dev/null'
    + sh -c 'install -m 0755 -d /etc/apt/keyrings'
    + sh -c 'curl -fsSL "https://download.docker.com/linux/debian/gpg" -o /etc/apt/keyrings/docker.asc'
    + sh -c 'chmod a+r /etc/apt/keyrings/docker.asc'
    + sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list'
    + sh -c 'apt-get -qq update >/dev/null'
    + sh -c 'DEBIAN_FRONTEND=noninteractive apt-get -y -qq install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin docker-model-plugin >/dev/null'
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
            LANGUAGE = (unset),
            LC_ALL = (unset),
            LANG = "zh_CN.UTF-8"
        are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    debconf: delaying package configuration, since apt-utils is not installed
    Using systemd to manage Docker service
    + sh -c systemctl enable --now docker.service
      UNIT                                  LOAD   ACTIVE     SUB       DESCRIPTION
      dev-loop0.device                      loaded activating tentative /dev/loop0
      sys-devices-virtual-net-eth0.device   loaded active     plugged   /sys/devices/virtual/net/eth0
      sys-subsystem-net-devices-eth0.device loaded active     plugged   /sys/subsystem/net/devices/eth0
      -.mount                               loaded active     mounted   Root Mount
      dev-.incus\x2dmounts.mount            loaded active     mounted   /dev/.incus-mounts
      dev-full.mount                        loaded active     mounted   /dev/full
      dev-fuse.mount                        loaded active     mounted   /dev/fuse
      dev-incus.mount                       loaded active     mounted   /dev/incus
      dev-mqueue.mount                      loaded active     mounted   POSIX Message Queue File System
      dev-net-tun.mount                     loaded active     mounted   /dev/net/tun
      dev-null.mount                        loaded active     mounted   /dev/null
      dev-ptmx.mount                        loaded active     mounted   /dev/ptmx
      dev-random.mount                      loaded active     mounted   /dev/random
      dev-tty.mount                         loaded active     mounted   /dev/tty
      dev-urandom.mount                     loaded active     mounted   /dev/urandom
      dev-zero.mount                        loaded active     mounted   /dev/zero
      proc-cpuinfo.mount                    loaded active     mounted   /proc/cpuinfo
      proc-diskstats.mount                  loaded active     mounted   /proc/diskstats
      proc-loadavg.mount                    loaded active     mounted   /proc/loadavg
      proc-meminfo.mount                    loaded active     mounted   /proc/meminfo
      proc-slabinfo.mount                   loaded active     mounted   /proc/slabinfo
      proc-stat.mount                       loaded active     mounted   /proc/stat
      proc-swaps.mount                      loaded active     mounted   /proc/swaps
      proc-uptime.mount                     loaded active     mounted   /proc/uptime
      sys-devices-system-cpu.mount          loaded active     mounted   /sys/devices/system/cpu
      sys-fs-fuse-connections.mount         loaded active     mounted   FUSE Control File System
      sys-kernel-config.mount               loaded active     mounted   Kernel Configuration File System
      sys-kernel-debug.mount                loaded active     mounted   Kernel Debug File System
      sys-kernel-tracing.mount              loaded active     mounted   Kernel Trace File System
      systemd-ask-password-console.path     loaded active     waiting   Dispatch Password Requests to Console Directory Watch
      systemd-ask-password-wall.path        loaded active     waiting   Forward Password Requests to Wall Directory Watch
      init.scope                            loaded active     running   System and Service Manager
      cloud-config.service                  loaded active     exited    Apply the settings specified in cloud-config
      cloud-final.service                   loaded active     exited    Execute cloud user/final scripts
      cloud-init-local.service              loaded active     exited    Initial cloud-init job (pre-networking)
      cloud-init.service                    loaded active     exited    Initial cloud-init job (metadata service crawler)
      console-getty.service                 loaded active     running   Console Getty
      containerd.service                    loaded active     running   containerd container runtime
      cron.service                          loaded active     running   Regular background program processing daemon
      dbus.service                          loaded active     running   D-Bus System Message Bus
      docker.service                        loaded active     running   Docker Application Container Engine
      exim4.service                         loaded active     running   LSB: exim Mail Transport Agent
      nftables.service                      loaded active     exited    nftables
      polkit.service                        loaded active     running   Authorization Manager
      ssh.service                           loaded active     running   OpenBSD Secure Shell server
      systemd-journal-flush.service         loaded active     exited    Flush Journal to Persistent Storage
      systemd-journald.service              loaded active     running   Journal Service
      systemd-logind.service                loaded active     running   User Login Management
      systemd-network-generator.service     loaded active     exited    Generate network units from Kernel command line
      systemd-networkd-wait-online.service  loaded active     exited    Wait for Network to be Configured
      systemd-networkd.service              loaded active     running   Network Configuration
      systemd-remount-fs.service            loaded active     exited    Remount Root and Kernel File Systems
      systemd-resolved.service              loaded active     running   Network Name Resolution
      systemd-sysctl.service                loaded active     exited    Apply Kernel Variables
      systemd-sysusers.service              loaded active     exited    Create System Users
      systemd-tmpfiles-setup-dev.service    loaded active     exited    Create Static Device Nodes in /dev
      systemd-tmpfiles-setup.service        loaded active     exited    Create System Files and Directories
      systemd-udev-trigger.service          loaded active     exited    Coldplug All udev Devices
      systemd-udevd.service                 loaded active     running   Rule-based Manager for Device Events and Files
      systemd-update-utmp.service           loaded active     exited    Record System Boot/Shutdown in UTMP
      systemd-user-sessions.service         loaded active     exited    Permit User Sessions
      -.slice                               loaded active     active    Root Slice
      system-getty.slice                    loaded active     active    Slice /system/getty
      system-modprobe.slice                 loaded active     active    Slice /system/modprobe
      system.slice                          loaded active     active    System Slice
      user.slice                            loaded active     active    User and Session Slice
      cloud-init-hotplugd.socket            loaded active     listening cloud-init hotplug hook socket
      dbus.socket                           loaded active     running   D-Bus System Message Bus Socket
      docker.socket                         loaded active     running   Docker Socket for the API
      ssh.socket                            loaded active     running   OpenBSD Secure Shell server socket
      systemd-initctl.socket                loaded active     listening initctl Compatibility Named Pipe
      systemd-journald-dev-log.socket       loaded active     running   Journal Socket (/dev/log)
      systemd-journald.socket               loaded active     running   Journal Socket
      systemd-networkd.socket               loaded active     running   Network Service Netlink Socket
      systemd-udevd-control.socket          loaded active     running   udev Control Socket
      systemd-udevd-kernel.socket           loaded active     running   udev Kernel Socket
      basic.target                          loaded active     active    Basic System
      cloud-config.target                   loaded active     active    Cloud-config availability
      cloud-init.target                     loaded active     active    Cloud-init target
      cryptsetup.target                     loaded active     active    Local Encrypted Volumes
      getty.target                          loaded active     active    Login Prompts
      graphical.target                      loaded active     active    Graphical Interface
      integritysetup.target                 loaded active     active    Local Integrity Protected Volumes
      local-fs-pre.target                   loaded active     active    Preparation for Local File Systems
      local-fs.target                       loaded active     active    Local File Systems
      multi-user.target                     loaded active     active    Multi-User System
      network-online.target                 loaded active     active    Network is Online
      network-pre.target                    loaded active     active    Preparation for Network
      network.target                        loaded active     active    Network
      nss-lookup.target                     loaded active     active    Host and Network Name Lookups
      paths.target                          loaded active     active    Path Units
      remote-cryptsetup.target              loaded active     active    Remote Encrypted Volumes
      remote-fs.target                      loaded active     active    Remote File Systems
      remote-veritysetup.target             loaded active     active    Remote Verity Protected Volumes
      slices.target                         loaded active     active    Slice Units
      sockets.target                        loaded active     active    Socket Units
      swap.target                           loaded active     active    Swaps
      sysinit.target                        loaded active     active    System Initialization
      timers.target                         loaded active     active    Timer Units
      veritysetup.target                    loaded active     active    Local Verity Protected Volumes
      apt-daily-upgrade.timer               loaded active     waiting   Daily apt upgrade and clean activities
      apt-daily.timer                       loaded active     waiting   Daily apt download activities
      dpkg-db-backup.timer                  loaded active     waiting   Daily dpkg database backup timer
      e2scrub_all.timer                     loaded active     waiting   Periodic ext4 Online Metadata Check for All Filesystems
      exim4-base.timer                      loaded active     waiting   Daily exim4-base housekeeping
      systemd-tmpfiles-clean.timer          loaded active     waiting   Daily Cleanup of Temporary Directories
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    106 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    INFO: Docker daemon enabled and started
    
    + sh -c 'docker version'
    Client: Docker Engine - Community
     Version:           29.1.4
     API version:       1.52
     Go version:        go1.25.5
     Git commit:        0e6fee6
     Built:             Thu Jan  8 19:56:47 2026
     OS/Arch:           linux/amd64
     Context:           default
    
    Server: Docker Engine - Community
     Engine:
      Version:          29.1.4
      API version:      1.52 (minimum version 1.44)
      Go version:       go1.25.5
      Git commit:       08440b6
      Built:            Thu Jan  8 19:56:47 2026
      OS/Arch:          linux/amd64
      Experimental:     false
     containerd:
      Version:          v2.2.1
      GitCommit:        dea7da592f5d1d2b7755e3a161be07f43fad8f75
     runc:
      Version:          1.3.4
      GitCommit:        v1.3.4-0-gd6d73eb8
     docker-init:
      Version:          0.19.0
      GitCommit:        de40ad0
    
    ================================================================================
    
    To run Docker as a non-privileged user, consider setting up the
    Docker daemon in rootless mode for your user:
    
        dockerd-rootless-setuptool.sh install
    
    Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.
    
    
    To run the Docker daemon as a fully privileged service, but granting non-root
    users access, refer to https://docs.docker.com/go/daemon-access/
    
    WARNING: Access to the remote API on a privileged Docker daemon is equivalent
             to root access on the host. Refer to the 'Docker daemon attack surface'
             documentation for details: https://docs.docker.com/go/attack-surface/
    
    ================================================================================
    
    root@isif-9471:~/alpine# 
    root@isif-9471:~/alpine# docker compose up -d
    [+] up 4/4
    [+] up 6/6lpine:latest Pulled                                                                                                      6.7s 
     ✔ Image alpine:latest    Pulled                                                                                                   6.7s 
       ✔ 1074353eec0d         Pull complete                                                                                            2.9s 
       ✔ 644afed44dca         Download complete                                                                                        0.0s 
       ✔ 5c1f58ba4e0d         Download complete                                                                                        0.0s 
     ✔ Network alpine_default Created                                                                                                  0.2s 
     ✔ Container alpine       Created                                                                                                  0.8s 
    Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: open sysctl net.ipv4.ip_unprivileged_port_start file: reopen fd 3: permission denied
    root@isif-9471:~/alpine# cat docker-compose.yaml
    name: alpine
    
    services:
      alpine-container:
        image: alpine:latest
        container_name: alpine
        # network_mode: host
        ports:
          - "10031:22"
          - "10032:10032"
        tty: true
        stdin_open: true
        environment:
          TZ: "Asia/Shanghai"
        volumes:
          - ./data:/data
        restart: always
    root@isif-9471:~/alpine# nano docker-compose.yaml
    root@isif-9471:~/alpine# cat docker-compose.yaml
    name: alpine
    
    services:
      alpine-container:
        image: alpine:latest
        container_name: alpine
        network_mode: host
        tty: true
        stdin_open: true
        environment:
          TZ: "Asia/Shanghai"
        volumes:
          - ./data:/data
        restart: always
    root@isif-9471:~/docker# docker compose up -d
    WARN[0000] No services to build                         
    [+] up 1/1
     ✔ Container alpine Running
    root@isif-9471:~/docker# docker exec -it alpine echo running
    running
    root@isif-9471:~/docker# 
    
    0
  7. sdcfre 钻石 3 YEARS 10 个月前

    看一看

    0
  8. azhaoyihao 荣耀 水王 10 个月前

    我没有这个机子

    0
  9. ax570383885 铂金 不离不弃 10 个月前

    收到提醒 来看看

    0
  10. Kallyas 黄金 10 个月前

    谢谢分享

    0
  11. hakd 王者 2 YEARS 10 个月前

    还是挺有想法的,在本就是容器的虚拟机上,再运行容器,这个网络段肯定会有些问题的。估计要先找个教程看一下docker内外的网络构成理解原理了才能调吧,我觉得要在容器上搞几条静态路由啥的。

    0
  12. runoneall 王者 楼主 10 个月前

    不需要,是容器权限的事,我对 default 配置文件做了些修改,现在正常了

    ShareNL:使用 HZSG 节点的用户请注意 - 互联网服务 / 公告 - NodeLoc

    亲测好使

    2
  13. unpack 黄金 2 YEARS 10 个月前

    很需要 谢谢

    0
  14. wghdi 黄金 10 个月前

    收到提醒! 来看看,了解原因及解决办法!

    0