Repository navigation
Conversation
Adds a two-stage Dockerfile and docker-compose.yaml so dnsglobe can be run without a local Rust toolchain: docker run -it --rm ghcr.io/514-labs/dnsglobe:edge example.com The build stage uses rust:1.88-slim (bumped from 1.85 — hickory-resolver 0.26, hickory-proto, and ratatui 0.30 all require 1.88). The runtime stage uses distroless/cc-debian12: hickory-resolver uses plain UDP/TCP with no TLS dependencies, so no ca-certificates or openssl is needed. A GitHub Actions workflow (container.yml) builds on every PR and push, publishes to ghcr.io/514-labs/dnsglobe on pushes to main (edge tag) and on version tags (semver: v1.2.3 → 1.2.3 and 1.2). Multi-arch: linux/amd64 + linux/arm64 with GHA layer cache. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
slmingol
force-pushed
the
upstream-pr/containerize
branch
from
September 21, 2026 01:55
e3095aa to
a6218a5
Compare
5 tasks
slmingol
added a commit
to slmingol/dnsglobe
that referenced
this pull request
Sep 21, 2026
Adds a second binary `dnsglobe-web` — an Axum 0.8 WebSocket server that
streams DNS propagation results as JSON to a single-file browser UI.
The UI shows a live resolver table (Resolver, Loc, IP, Ping, Status, Answer)
and a rotating D3 orthographic globe with per-resolver status dots, matching
the TUI's visual language in the browser. Domain and record type are
configurable; results stream in real-time as the 34 parallel DNS queries
resolve.
Implementation:
- `src/lib.rs`: re-exports terminal-free modules (app, dns, globe, resolvers,
sites) as a lib crate so `dnsglobe-web` can share DNS/resolver logic without
pulling in ratatui/crossterm
- `src/bin/web.rs`: Axum router with `/` (HTML) and `/ws` (WebSocket);
JoinSet drives 34 concurrent hickory-resolver queries; each result streams
immediately as JSON: {index, resolver, ip, location, status, answer, ttl,
ping_ms, lat, lon, total}
- `src/static/index.html`: dark-themed single-file frontend; D3 7.9.0 +
topojson-client 3 from CDN; globe auto-rotates; land features cached on
load; progress bar tracks X/34; table updates live as results arrive
- `Cargo.toml`: adds axum 0.8 (ws feature), serde_json, tower-http 0.6
(cors); declares `[lib]` and `[[bin]]` targets for both binaries
- `Dockerfile`: copies both binaries into the distroless runtime image
- `docker-compose.yaml`: adds `dnsglobe-web` service with port 8080 and
PORT env var; `dnsglobe` TUI service unchanged
Usage (no local Rust toolchain required):
docker compose up dnsglobe-web
open http://localhost:8080
Depends on: 514-labs#44 (Docker/Podman container support)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
slmingol
added a commit
to slmingol/dnsglobe
that referenced
this pull request
Sep 21, 2026
Adds a second binary `dnsglobe-web` — an Axum 0.8 WebSocket server that
streams DNS propagation results as JSON to a single-file browser UI.
The UI shows a live resolver table (Resolver, Loc, IP, Ping, Status, Answer)
and a rotating D3 orthographic globe with per-resolver status dots, matching
the TUI's visual language in the browser. Domain and record type are
configurable; results stream in real-time as the 34 parallel DNS queries
resolve. A footer shows the binary version and links to the repo.
Implementation:
- `src/lib.rs`: re-exports terminal-free modules (app, dns, globe, resolvers,
sites) as a lib crate so `dnsglobe-web` shares DNS/resolver logic without
pulling in ratatui/crossterm
- `src/bin/web.rs`: Axum router with `/` (HTML) and `/ws` (WebSocket);
JoinSet drives 34 concurrent hickory-resolver queries; each result streams
immediately as JSON; version injected via env!("CARGO_PKG_VERSION")
- `src/static/index.html`: dark-themed single-file frontend; D3 7.9.0 +
topojson-client 3 from CDN; auto-rotating orthographic globe; live table;
progress bar; footer with version + repo link
- `Cargo.toml`: adds axum 0.8 (ws feature), serde_json, tower-http 0.6
(cors); declares `[lib]` and `[[bin]]` targets for both binaries
- `Dockerfile`: cargo-chef for dep caching; copies both binaries into the
distroless runtime image; native arm64 + amd64 build via GitHub Actions
- `docker-compose.yaml`: adds `dnsglobe-web` service on port 8080;
`dnsglobe` TUI service unchanged
- `CHANGELOG.md` / `README.md`: updated for web UI usage
Usage (no local Rust toolchain required):
docker compose up dnsglobe-web
open http://localhost:8080
Depends on: 514-labs#44 (Docker/Podman container support)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
@slmingol Why do you need this? the binary release doesn't require a local Rust toolchain |
Author
I find it easier to manage all my sprawling CLI tools with containerized versions vs. landing them directly on my systems these days. Also I did this as foundational work bc I then added a web UI version which leverages the app being a containerized app. Look at my other PR(s) involving the web UI I added to this app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dockerfile(build:rust:1.88-slim, runtime:distroless/cc-debian12)docker-compose.yamlcompatible with Docker Compose and Podman Compose.dockerignoreto excludetarget/,.git/,demo/from build context.github/workflows/container.yml— builds on every PR, publishes to GHCR onmainpush and version tagsrust-versioninCargo.tomlfrom1.85to1.88(required byhickory-resolver0.26,hickory-proto, andratatui0.30)Usage
No local Rust toolchain required:
docker run -it --rm ghcr.io/514-labs/dnsglobe:edge example.com # or podman run -it --rm ghcr.io/514-labs/dnsglobe:edge example.comShell alias:
GHCR image tags
mainedgev1.2.3tag1.2.3,1.2Notes
hickory-resolveruses plain UDP/TCP only — nonative-tls,openssl, orrustlsin the dependency tree.distroless/cc(glibc + libgcc) is sufficient; noca-certificatesneeded.stdin_open: true+tty: trueindocker-compose.yamlso the ratatui TUI renders correctly in interactive sessions.linux/amd64+linux/arm64via buildx with GHA layer cache.Verification
🤖 Generated with Claude Code