This document provides a high-level overview of Dock2Tauri’s architecture, components, and data flow.
Dock2Tauri is a bridge that transforms Docker containers into native desktop applications using Tauri. It consists of multiple launcher interfaces, a Tauri desktop application, and supporting infrastructure.
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ User Input │ │ Launchers │ │ Tauri Desktop │
│ │ │ │ │ Application │
│ • Docker Image │───▶│ • Bash Script │───▶│ │
│ • Dockerfile │ │ • Python CLI │ │ • WebView │
│ • Host/Cont Port│ │ • Node.js Script │ │ • Container │
│ • Build Flags │ │ • Makefile │ │ Proxy/Bridge │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────────────┐ ┌─────────────────┐
│ Docker Container │ │ Native Bundle │
│ │ │ │
│ • Web App/Service│ │ • .deb, .rpm │
│ • Port Mapping │ │ • .AppImage │
│ • Auto-restart │ │ • .msi, .dmg │
└──────────────────┘ └─────────────────┘
Multiple entry points providing unified CLI across different environments:
scripts/dock2tauri.sh
)scripts/dock2tauri.py
+ taurido
package)scripts/dock2tauri.js
)tauri.conf.json
per runsrc-tauri/tauri.conf.json
DOCK2TAURI_SKIP_APPIMAGE=1
- Skip AppImage bundlingDOCK2TAURI_FORCE_APPIMAGE=1
- Force AppImage in cross-modeDOCK2TAURI_CROSS_TARGETS="x,y,z"
- Override cross-compilation targetsDOCK2TAURI_DEBUG=1
- Enable debug modeAdvanced Configuration Architecture providing complete flexibility for build workflows:
┌─────────────────┐ ┌──────────────────────┐ ┌─────────────────┐
│ CLI Arguments │───▶│ Argument Processor │───▶│ Build System │
│ │ │ │ │ │
│ --output-dir= │ │ • parse_custom_opts() │ │ • EXPORT_DIR │
│ --app-name= │ │ • FILTERED_ARGS │ │ • tauri config │
│ --filename= │ │ • Environment sync │ │ • Bundle naming │
│ --copy-to= │ │ • Path resolution │ │ • Multi-copy │
└─────────────────┘ └──────────────────────┘ └─────────────────┘
Configuration Flow:
.env
→ defaults)Key Features:
.env.example
→ .env
automatic setup┌─────────────────────────────────────────────────────────┐
│ Tauri App │
│ ┌─────────────────┐ ┌─────────────────────────────────┐ │
│ │ Frontend │ │ Backend │ │
│ │ │ │ │ │
│ │ • HTML/CSS/JS │ │ • Rust Core │ │
│ │ • WebView │◄─┤ • Docker Integration │ │
│ │ • Control Panel │ │ • Container Management │ │
│ │ │ │ • Bundle Generation │ │
│ └─────────────────┘ └─────────────────────────────────┘ │
│ │ │
└─────────────────────────────────────┼────────────────────┘
│
▼
┌─────────────────┐
│ Docker Daemon │
│ │
│ • Container │
│ Lifecycle │
│ • Port Mapping │
│ • Health Checks │
└─────────────────┘
app/
)src-tauri/
)Source → Docker Build → Tauri Config → Native Compile → Bundle Creation
│ │ │ │ │
▼ ▼ ▼ ▼ ▼
Dockerfile Container temp.json Binary .deb/.rpm/etc
│ Ready Generated Compiled Generated
│ │ │ │ │
└───────────┴──────────────┴──────────────┴──────────────┘
│
▼ (Export to dist/)
┌─────────────────────────────┐
│ Platform Folders │
│ │
│ • dist/linux-x64/ │
│ • dist/linux-arm64/ │
│ • dist/windows-x64/ │
│ • dist/macos-x64/ │
│ • dist/macos-arm64/ │
│ • dist/android-apk/ │
└─────────────────────────────┘
Desktop App (Tauri) Host System Docker Container
│ │ │
│ ┌─────────────────┐ │ ┌─────────────────┐ │
└─┤ WebView ├─┼─┤ Port Forward ├──┘
│ localhost:HOST │ │ │ HOST:CONTAINER │
└─────────────────┘ │ └─────────────────┘
│
│ ┌─────────────────┐
└─┤ Docker Daemon │
└─────────────────┘
cargo tauri dev
)tauri.conf.json
with devUrl--build
)dist/<platform>/
with READMECLI Args → Environment Variables → Default Values
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────┐
│ Unified Configuration │
│ │
│ • Docker image/Dockerfile │
│ • Host/Container ports │
│ • Build targets and flags │
│ • Health check configuration │
│ • Bundler preferences │
└─────────────────────────────────────────────┘
│
▼
┌─────────────────┐
│ Tauri Config │
│ Generator │
└─────────────────┘
│
▼
┌─────────────────┐
│ temp.json │
│ (ephemeral) │
└─────────────────┘
generate_tauri_config_json()
in launchersmap_target_to_platform()
CANDIDATE_TARGETS
arraycan_cross_compile_target()