Docker Toolbox Simplifying container management for developers and system administrators.
Docker Toolbox is a lightweight Electron-based tool that provides an intuitive user interface for managing Docker containers. It offers real-time container status updates, controls for starting/stopping containers, and additional features like container search, logs display, dark mode toggle, and more.
- Dashboard Overview: Get an at-a-glance view of all your Docker containers, categorized by status (Running, All, Dead, Always-On).
- Search Functionality: Quickly find Docker containers using a search input to filter by container names or details.
- Container Management:
- Start, stop, or restart individual containers.
- View container logs in real-time.
- Toggle the "Always On" feature to ensure critical containers are always running (
restart-policy: unless-stopped).
- Batch Restart: Restart all containers in a specific tab (Running, Dead, All, Always-On).
- Dark Mode Toggle: Switch between light and dark themes with a persistent setting stored locally.
- Terminal Integration: Open container logs in a system terminal window for detailed monitoring.
- Minimal UI Controls: Minimize or close the application window directly from the UI (for Electron environments).
Before you can run the Docker Toolbox, ensure you have the following installed:
- Docker (version 19.x or newer)
- Node.js (version 14.x or newer)
- Electron (for running the desktop app)
-
Clone the Repository:
git clone git@github.com:ktsoaela/dockerToolBox.git cd docker-toolbox -
Install Dependencies: Install the necessary Node.js packages using npm or yarn:
npm install
-
Run the App: Start the Electron app:
npm start
Once the application is running, you can:
- View containers: The default view shows running containers. You can navigate through tabs to see all containers, dead containers, or containers marked as always-on.
- Search for containers: Click the search icon in the top-right to filter containers by name or other details.
- Control containers: Use the dropdown menu next to each container to restart, stop, or view logs. You can also toggle the always-on status directly from the dropdown.
- Batch restart: On any tab (Running, All, Dead, Always-On), click the "Restart All" button to restart all containers in that category.
- Dark mode: Use the theme toggle button in the top-right corner to switch between light and dark modes. The setting will persist across sessions.
The toolbox uses window.electronAPI to interact with Docker. This is an Electron-specific feature that enables direct communication with Docker commands through Electron's main process.
- runDockerCommand(action, containerId): Executes Docker actions like
restart,stop, ortailedLogs. - getDockerPs(): Fetches the current list of Docker containers and their statuses.
The core functionality of the Docker Toolbox is powered by several key JavaScript functions:
loadDockerData(): Loads all Docker containers and dynamically updates the dashboard UI with counts and statuses.toggleAlwaysOn(containerId, element): Toggles the restart policy of a container to ensure it stays "Always On."restartAllContainers(): Restarts all containers shown in the current tab.showLogs(containerId): Displays logs for the selected container in a terminal window.
- Platform Compatibility: The tool uses
gnome-terminalto display container logs, which is currently tailored for Linux systems. For Windows or macOS, additional adjustments to theopenTerminalWithLogsfunction may be required.
- Container Metrics: Add real-time container resource metrics (CPU, Memory, etc.).
- Enhanced Error Handling: Improve error messages and user feedback for Docker command failures.
- Multi-platform Terminal Support: Expand terminal integration for container logs to work across different operating systems.
We welcome contributions! If you have suggestions for new features or improvements, feel free to submit a pull request.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/new-feature). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature/new-feature). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.