2026-02-25 13:44:27 -05:00
# Tux-Dock
### A lightweight C++ Docker TUI
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
Tux-Dock is a modern **C++17 ** Docker terminal frontend built with **FTXUI ** .
It gives you a guided, keyboard-first TUI for common Docker operations like pulling images, running containers, inspecting IPs, and managing images/containers without memorizing long CLI flags.
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## Features
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
- Interactive Docker workflows through a single-screen TUI with modal steps.
- Picker-based selection (arrow keys + Enter) for containers/images instead of numeric menus.
- High-level status panel with responsive wait states for slower operations.
- Rich container display with state and forwarded ports.
- Interactive shell handoff with clean terminal clear before/after shell transitions.
- Image operations: pull/list/delete with curated quick picks and custom image support.
- Script-to-image workflow: generate Dockerfile from bash script, then optionally build.
- MySQL quick start flow with version/password/port prompts.
- About screen in-app with project/version/repository info.
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## Build Requirements
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
- **C++17 or newer** compiler (e.g. `g++` , `clang++` )
2026-02-25 12:14:34 -05:00
- **CMake 3.16+**
2025-10-18 23:38:32 +00:00
- **Docker Engine** installed and running
---
2026-02-25 13:44:27 -05:00
## Build & Run
2025-10-18 23:38:32 +00:00
```bash
# Clone the repo
2025-11-03 19:56:19 -05:00
git clone https://mentalnet.xyz/forgejo/markmental/tuxdock.git
2025-10-18 23:38:32 +00:00
cd tuxdock
2026-02-25 12:14:34 -05:00
# Configure & build (FTXUI is fetched automatically)
cmake -S . -B build
cmake --build build -j
2025-10-18 23:38:32 +00:00
# Run it (requires Docker permissions)
2026-02-25 12:14:34 -05:00
sudo ./build/tux-dock
```
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
Prefer a prebuilt binary? CI artifacts are published at:
2025-11-03 18:30:18 -05:00
https://mentalnet.xyz/forgejo/markmental/tuxdock/actions
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## Menu Overview
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
Current TUI actions:
1. Pull Docker Image
2. Run/Create Interactive Container
3. List All Containers
4. List All Images
5. Start Container Interactively (boot new session)
6. Start Detached Container Session
7. Delete Docker Image
8. Stop Container
9. Remove Container
2025-10-18 23:38:32 +00:00
10. Attach Shell to Running Container
2025-11-02 08:32:31 -05:00
11. Run Detached Command in Container
12. Spin Up MySQL Container
13. Get Container IP Address
14. Create Dockerfile & Build Image from Bash Script
2026-02-25 13:44:27 -05:00
15. About Tux-Dock
16. Exit
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## Design Overview
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
Tux-Dock is now structured around **two main classes ** :
2025-10-18 23:38:32 +00:00
```cpp
class DockerManager {
2025-11-04 13:04:56 -05:00
public:
2026-02-25 13:44:27 -05:00
struct ContainerInfo {
std::string id;
std::string name;
std::string status;
std::string ports;
bool running;
};
// Docker command/data layer
std::vector<ContainerInfo> getContainerList() const;
std::vector<std::pair<std::string, std::string>> getImageList() const;
bool pullImage(...);
bool runContainerInteractive(...);
bool startInteractive(...);
bool startDetached(...);
bool stopContainer(...);
bool removeContainer(...);
bool deleteImage(...);
bool execShell(...);
bool execDetachedCommand(...);
bool spinUpMySQL(...);
bool showContainerIP(...);
bool createDockerfile(...);
};
class TuxDockApp {
public:
void Run();
2025-11-04 13:04:56 -05:00
private:
2026-02-25 13:44:27 -05:00
// TUI orchestration layer
void OpenInput(...);
void OpenSelect(...);
void OpenConfirm(...);
void RunDeferredStatusAction(...);
void RunWithRestoredIO(...);
void ExecuteSelectedAction();
// action handlers bridge UI -> DockerManager
2025-10-18 23:38:32 +00:00
};
```
2026-02-25 13:44:27 -05:00
### Responsibilities
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
- `DockerManager`
- Executes Docker commands.
- Escapes shell arguments and returns success/failure + user-facing messages.
- Collects container/image data used by the UI.
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
- `TuxDockApp`
- Renders the FTXUI interface.
- Manages modal flows (input/select/confirm/message).
- Handles status updates, deferred actions, and interactive shell transitions.
- Coordinates end-to-end user flows by calling `DockerManager` methods.
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
This split keeps Docker behavior isolated while making UI behavior easier to extend.
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## About / Version
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
- Version: `022526-dev`
- Created by: `markmental`
- GitHub: https://github.com/MARKMENTAL/tuxdock
- Forgejo: https://mentalnet.xyz/forgejo/markmental/tuxdock
2025-10-18 23:38:32 +00:00
---
2026-02-25 13:44:27 -05:00
## License
2025-10-18 23:38:32 +00:00
2026-02-25 13:44:27 -05:00
MIT License — free to use, modify, and share.