Skip to content

build(devcontainer): add ping, traceroute, mtr, nc and tcpdump #5343

Closed

Description

@dan-petty

Problem

The devcontainer image has no basic network diagnostics tools. On 2026-11-13 the owner said: "I also noticed my devcontainer environment is missing basic networking diagnostics tools like ping". Present: dig, nslookup, ip, ss, curl. Missing: ping, traceroute or tracepath, mtr, nc, tcpdump. The apt block of .devcontainer/Dockerfile installs only python3.14, ca-certificates, shellcheck, gnome-keyring, dbus-x11, bubblewrap and socat.

The container runs under rootless Podman as uid 1000 (.devcontainer/devcontainer.json runArgs: --gpus all, --pids-limit=8192). The default Podman capability set has no NET_RAW, and the default net.ipv4.ping_group_range lets only group 0 open ICMP datagram sockets. So an installed ping does not work for the user without one more setting.

Proposed solution

  • Add the Debian packages iputils-ping, iputils-tracepath, traceroute, mtr-tiny, netcat-openbsd and tcpdump to the apt block (pinned the way the image pins its other packages).
  • Add --sysctl=net.ipv4.ping_group_range=0 2147483647 to runArgs so ping works as the user with no raw socket. Add --cap-add=NET_RAW only if mtr and tcpdump need it, and record the reason (security review: a raw socket inside the container network only).
  • Prove each tool in the rebuilt image under rootless Podman: ping and tracepath to a public address, mtr --report -c 1, nc -zv, tcpdump -c 1 on the container interface.
  • The image builds in CI (DevContainer Image job); no change on CI runners.

Acceptance

  • In a rebuilt devcontainer, ping -c 1 1.1.1.1, tracepath -n 1.1.1.1, mtr --report -c 1 1.1.1.1, nc -zv github.com 443 and sudo tcpdump -c 1 (or without sudo with the capability) work as the user vscode.
  • docs that list the image tools name them.

Activity

  1. added
    source/agent
    type/infra
    scope/devcontainer
    status/new
    value/medium
    effort/low
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P3-Low. This is a developer convenience addition with no blocking impact on users or CI.
    • Related: build(devcontainer): move the docker-in-docker feature to 4 #5073, which asks for a different change. Both modify the devcontainer build configuration, but #5073 upgrades the docker-in-docker feature while this adds network diagnostic packages and Podman sysctl settings.
  3. added
    priority/p3-low
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 13, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p3-lowscope/devcontainersource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions