A single-container solution that displays all running Docker containers on your system along with their exposed ports. Clicking on a container card opens its port in a new tab at http://ani.local:<port>/.
Built with React + Vite frontend and Flask backend, combined into one efficient Docker image using multi-stage builds.
- 🐳 Displays all running Docker containers
- 🔍 Shows container names, IDs, and status
- 🔗 Displays exposed ports for each container
- 🚀 Click on any container to open
http://ani.local:<port>/in a new tab - 🔄 Auto-refreshes every 30 seconds
- 🎨 Modern dark theme UI
- 📦 Single Docker container - no multi-service setup needed!
This is a single-service application using a multi-stage Docker build:
- Stage 1 (Build): Node.js builds the React/Vite frontend
- Stage 2 (Runtime): Python Flask serves the static files AND provides the API
- Serves the built React app as static files
- Provides
/api/containersendpoint to query Docker socket - Everything runs in one container on port 5000
- Docker and Docker Compose installed on your system
- Access to Docker socket (
/var/run/docker.sock)
# Build and start the single container
docker-compose up --build
# Or run in detached mode
docker-compose up -d --buildOnce started, access the UI at: http://localhost:5000
docker-compose down# Build the image
docker build -t docker-containers-ui .
# Run the container
docker run -d \
--name docker-containers-ui \
-p 5000:5000 \
-v /var/run/docker.sock:/var/run/docker.sock \
docker-containers-uiYes, this is fully portable! You can build the Docker image on one machine and run it on any other device:
Option 1: Build on target machine (Recommended)
# Copy the source code to the new machine
# Then run:
docker-compose up --build -dOption 2: Transfer pre-built image
# On source machine
docker save docker-containers-ui > docker-containers-ui.tar
# Transfer the file to target machine (scp, rsync, etc.)
scp docker-containers-ui.tar user@target-machine:
# On target machine
docker load < docker-containers-ui.tar
docker run -d \
--name docker-containers-ui \
-p 5000:5000 \
-v /var/run/docker.sock:/var/run/docker.sock \
docker-containers-ui- Docker Engine installed and running
- Docker socket access (the container needs to communicate with host Docker)
- Same CPU architecture (x86_64, ARM, etc.) - or build on the target device
- Port 5000 available (or modify in docker-compose.yml)
If moving between different architectures (e.g., Intel → Apple Silicon):
- Build the image directly on the target device (recommended)
- Or use Docker's multi-arch build features
Edit docker-compose.yml:
ports:
- "8080:5000" # Access on port 8080 instead of 5000By default, clicking a container opens http://ani.local:<port>/. To change this:
Edit src/src/App.jsx, find the openContainer function:
const url = `http://ani.local:${port}/`
// Change 'ani.local' to your hostname or IP/workspace
├── Dockerfile # Multi-stage build (React + Flask in one)
├── docker-compose.yml # Single service configuration
├── app.py # Flask backend API
├── README.md # This file
└── src/ # React frontend source
├── package.json # Node.js dependencies
├── vite.config.js # Vite configuration
├── index.html # HTML entry point
└── src/
├── main.jsx # React entry point
├── App.jsx # Main React component
└── App.css # Styles
# Install frontend dependencies
cd src
npm install
# Start frontend dev server
npm run dev
# In another terminal, start Flask backend
cd ..
pip install flask docker
python app.pyNote: The backend still needs Docker socket access to list containers.
If you get permission errors accessing the Docker socket:
sudo chmod 666 /var/run/docker.sockOr add your user to the docker group:
sudo usermod -aG docker $USER
# Then logout and login again- Ensure you have running containers with exposed ports on the host
- Check if the Docker socket is properly mounted
- View container logs:
docker logs docker-containers-ui
- Verify port 5000 is not in use by another service
- Check if the container is running:
docker ps | grep docker-containers-ui - View logs:
docker-compose logs
- Ensure the containers have their ports published/exposed
- The hostname
ani.localshould resolve to your Docker host - For remote access, configure your DNS or use the host's IP address
MIT