How ruddhaani/disposable-browser-docker works
Project type and purpose
• This is a small, containerized “Disposable Browser” tool. It’s neither a full-stack web app nor a compiler; instead, it’s an open-source privacy/security utility packaged in Docker.
• Purpose: Launch a Firefox browser in an isolated container, route all traffic through Tor, and use a non-root user. Mount the X11 socket so the GUI appears on the host.
File structure
• Top level:
• Dockerfile – the only build artifact.
• README.md – describes usage, features, network setup.
• No source subfolders; the container image encapsulates all logic.
• Dockerfile likely:
• Starts from Ubuntu 20.04
• Installs Tor, Firefox
• Adds a non-root user
• Configures Tor as a SOCKS proxy
• Exposes GUI via X11 socket mount
• No microservices or MVC; this is a single-container design with host-to-container integrations.
Key insights from README
• Core components: Docker image, Ubuntu base, Firefox, Tor network
• Two deployment modes:
• Direct run (mount X11, DISPLAY env)
• Isolated network run (custom Docker bridge network)
• Use cases: anonymous browsing, app testing in isolation, privacy protection
a. Main components
1. Host machine
• Docker Engine
• X11 server
2. Docker container
• OS layer (Ubuntu 20.04)
• Tor daemon (local SOCKS proxy)
• Firefox browser (non-root user)
3. External Tor network
b. Relationships & interactions
• Host X11 socket → mounted into container → Firefox draws GUI → X server on host displays windows
• Firefox → SOCKS proxy at localhost:9050 (Tor) → Tor network → Internet
• Docker Engine → manages container lifecycle
• (Optional) Docker bridge network isolates container’s network namespace
c. Architectural patterns / principles
• Containerization for isolation
• Principle of least privilege (non-root user inside container)
• Defense in depth (isolated Docker network if needed)
d. Technologies / frameworks
• Docker (image build & runtime)
• Ubuntu 20.04 base image
• Tor (anonymity network)
• Firefox (GUI application)
• X11 (display forwarding)