Sign inSign up

cmunroe/ipinfo

By cmunroe

•Updated about 24 hours ago

Image
0

10K+

cmunroe/ipinfo repository overview

⁠ipinfo.app CLI

Docker Pulls Image Size

Cross-platform terminal client for the ipinfo.app⁠ service suite — look up IP addresses, ASNs, and IP reputation, run a speedtest, and trace routes with per-hop ASN/PoP annotation, all from a single Alpine-based container.

Drop-in-adjacent with scripts written against ipinfo.io's CLI: same subcommand surface, same response field names where we have equivalent data, so migration is usually just swapping the binary.


⁠Quick Start

# Your own IP (dual-stack — returns both IPv4 and IPv6)
docker run --rm cmunroe/ipinfo myip

# Any IP
docker run --rm cmunroe/ipinfo 8.8.8.8

# ASN details
docker run --rm cmunroe/ipinfo asn 13335

# Reputation check (free tier)
docker run --rm cmunroe/ipinfo classify 8.8.8.8

# Bulk lookups from stdin
echo -e "8.8.8.8\n1.1.1.1\n9.9.9.9" | docker run -i --rm cmunroe/ipinfo

# Field extraction
docker run --rm cmunroe/ipinfo 8.8.8.8 -f country
# → US

# Speedtest
docker run --rm cmunroe/ipinfo speedtest --size 10

⁠Commands

CommandWhat it does
myipYour public IPv4 and IPv6 addresses, in parallel. Returns both with reverse DNS, ASN, country.
<ip>Look up any IP. Returns {ip, hostname, country, org, asn:{…}}.
asn <number>ASN details — organisation, advertised prefixes, country. Accepts 13335 or AS13335.
bulk <ip>…Look up multiple IPs in parallel. Also reads from stdin.
summarizeAggregate stdin-piped IPs by country and ASN.
classify <ip>IP reputation. --api v1 (free, single-char) / --api v2 / --api v3 (RapidAPI).
speedtestDownload + latency test against the ipinfo.app edge.
traceroute <host>Traceroute with per-hop ASN + carrier PoP annotation.
completion <shell>Emit shell completion for bash / zsh / fish.

Run docker run --rm cmunroe/ipinfo --help for the full reference.

⁠Response shape (drop-in with ipinfo.io)

Output is JSON by default with field names matching ipinfo.io's CLI so migrated scripts keep working:

{
  "ip": "8.8.8.8",
  "hostname": null,
  "country": "US",
  "org": "AS15169 GOOGLE",
  "asn": {
    "asn": "AS15169",
    "name": "GOOGLE",
    "route": "8.8.8.0/24"
  }
}

Fields we can't populate (city, region, postal, timezone, lat/lon) stay null — scripts reading -f country work unchanged, scripts reading -f postal get a null instead of an error.

⁠Output modes

FlagEffect
(default)Pretty-printed JSON
-j, --jsonForce JSON (also the default for most commands)
-cCSV with a header row
-f <path>, --field <path>Extract a single field by dotted path (e.g. asn.name, ipv6.country)

⁠Environment variables

VariablePurpose
IPINFO_APP_RAPIDAPI_KEYRapidAPI key for classify --api v2 and --api v3. v1 is free and needs no key.
NO_COLORDisable ANSI colour output.
IPINFO_APP_ATLAS_URLOverride the atlas endpoint (default https://atlas.ipinfo.app). Useful for early-access / staging.
docker run --rm \
  -e IPINFO_APP_RAPIDAPI_KEY="your-key" \
  cmunroe/ipinfo classify 8.8.8.8 --api v2

⁠Traceroute — add --cap-add=NET_RAW

The system traceroute binary inside the container uses raw UDP probes, which aren't in the default container capability set. For the traceroute subcommand only, add NET_RAW:

docker run --rm --cap-add=NET_RAW cmunroe/ipinfo traceroute 8.8.8.8

All other subcommands work from a vanilla docker run with no extra flags.

⁠Tags

From a single image digest on each release, four tags are published:

TagWhen to use
latest"Give me current" — default. Moves forward over time.
1.2.0Exact pin — reproducible builds.
1.2Minor-track pin — latest 1.2.x. Gets patch-level updates.
1Major-track pin — latest 1.y.z. Gets minor + patch updates.

Browse all tags: https://hub.docker.com/r/cmunroe/ipinfo/tags⁠

⁠Architectures

Multi-arch manifest — docker pull fetches the right variant for your host automatically:

  • linux/amd64
  • linux/arm64

Runs on Raspberry Pi 4/5, Apple Silicon Macs (via Docker Desktop), AWS Graviton, Oracle Ampere, and any x86_64 Linux host.

⁠Image details

  • Base: alpine:3.19
  • Size: ~15 MB
  • Runtime deps: curl, jq, ca-certificates, traceroute, bind-tools
  • User: non-root (ipinfo:ipinfo)
  • Entrypoint: /usr/local/bin/ipinfo — args pass straight through
  • Default command: --help so bare docker run shows usage instead of hanging on stdin

⁠Other install methods

If you'd rather not run in Docker, the CLI is a single shell script distributed via:

# Linux / macOS — installs to /usr/local/bin
curl -fsSL https://www.ipinfo.app/cli/install.sh | sh

# Windows PowerShell 5.1+
iwr -useb https://www.ipinfo.app/cli/install.ps1 | iex

Host-install requires curl + jq on *nix; PowerShell 5.1+ on Windows (no jq — uses ConvertFrom-Json).

⁠License

MIT. Not affiliated with, endorsed by, or related to ipinfo.io.

Tag summary

Content type

Image

Digest

sha256:e7996dd81…

Size

9.8 MB

Last updated

about 24 hours ago

docker pull cmunroe/ipinfo