Docker Backend Display
This project provides a web interface to display information about running Docker services, particularly useful for local development environments. It consists of a Node.js backend that interacts with the Docker socket and a React frontend for visualization.
Features
- Discovers running Docker containers with exposed ports.
- Prioritizes Traefik-exposed services, showing their public URLs.
- For non-Traefik services, identifies and makes clickable local IP addresses accessible from the client's subnet.
- Real-time updates for container start/stop events.
- Modern and responsive user interface with frosted glass effects for service cards.
Prerequisites
To run this application, you need to have the following installed:
- Docker: For running containers and interacting with the Docker daemon.
- Docker Compose: For orchestrating the backend and frontend services.
- Node.js & npm: (Optional, for local development outside Docker)
Running the Application Locally with Docker Compose
-
Clone the repository:
git clone <your-repository-url> cd docker-backend-display -
Start the services:
docker compose up --buildThis command will:
- Build the Docker images for both the backend and frontend services.
- Start the backend service, which connects to your Docker daemon.
- Start the frontend service.
-
Access the application:
- Frontend: Open your web browser and navigate to
http://localhost:3000. - Backend API: The backend API is available at
http://localhost:3001/api/services.
- Frontend: Open your web browser and navigate to
Configuration
The application can be configured using environment variables.
Frontend
-
REACT_APP_BACKEND_URL: The URL of the backend API. This is passed to the React application during the build process. If not set, the frontend will default tohttp://localhost:3001.To set this variable when running with Docker Compose, you can create a
.envfile in the root of the project with the following content:REACT_APP_BACKEND_URL=http://your-backend-url:3001Then run
docker compose up --build.
Accessing Services
- The frontend will display cards for each discovered Docker service.
- If a service is exposed via Traefik, clicking its card will take you to the Traefik-assigned URL.
- If a service is not Traefik-exposed but has an IP accessible from your local network, clicking its card will take you to that local IP and port.
- Otherwise, the card will list all accessible container IPs and ports as individual clickable links.