nerdctl: Can't access the exposed port from LAN in bridge mode.

Description

I am using nerdctl compose up -d to bulid a container in bridge mode. In my docker-compose.yaml, i have added the following mapping rules:

version: '3.9'
services:
  utorrent:
    image: ekho/utorrent:latest
    volumes:
      - utorrent-settings:/utorrent/settings
      - /home/Data/data:/data
      - /home/Data/abs:/abs-path-dir
    environment:
      UID: 1000
      GID: 1000
      webui: ng
      dir_autoload_delete: true
      dir_download: subdir1,/abs-path-dir
    network_mode: bridge
    ports:
      - "9080:8080"
      - "7881:6881"
      - "7881:6881/udp"
    restart: always
    logging:
      driver: "json-file"
      options:
        max-size: "10m"
        max-file: "3"

volumes:
  utorrent-settings:

After building and starting the container, i tried to access the webui from LAN, but can’t get through. However, it is OK when i tried to access in the localhost.

Steps to reproduce the issue

  1. create a docker-compose.yaml with the above configs.
  2. nerdctl compose up -d.
  3. try to access the webui with “http://ip:port” from LAN.
  4. try to access with “http://localhost:port” in local.

Describe the results you received and expected

I want to access the exposed port of my containers from LAN in bridge mode.

What version of nerdctl are you using?

WARN[0000] unable to determine buildctl version: exec: “buildctl”: executable file not found in $PATH Client: Version: 1.2.1 OS/Arch: linux/amd64 Git commit: <unknown> buildctl: Version:

Server: containerd: Version: 1.4.13~ds1 GitCommit: 1.4.13~ds1-1~deb11u3 runc: Version: 1.0.0~rc93+ds1 GitCommit: 1.0.0~rc93+ds1-5+deb11u2

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

Client: Namespace: default Debug Mode: false

Server: Server Version: 1.4.13~ds1 Storage Driver: overlayfs Logging Driver: json-file Cgroup Driver: systemd Cgroup Version: 2 Plugins: Log: fluentd journald json-file syslog Storage: native overlayfs Security Options: apparmor seccomp Profile: default cgroupns Kernel Version: 5.10.0-20-amd64 Operating System: Debian GNU/Linux 11 (bullseye) OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 7.669GiB Name: yongxisui ID: 48bd4f03-1111-4d87-a7f0-192411df39c5

WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

We find the same problem when nerdctl installed in a host with docker