A web-based terminal interface for Docker containers that allows you to interact with your running containers through a modern, user-friendly web interface. Features dynamic port allocation to avoid conflicts.
- 🖥️ Web-based Terminal: Access container shells directly from your browser
- 📊 Container Management: View and connect to all running containers
- 🔄 Real-time Interaction: Execute commands with instant feedback
- 📱 Responsive Design: Works on desktop and mobile devices
- 🔒 Local Access: Runs on your machine, connecting to your local Docker daemon
- 🔌 Dynamic Ports: Automatically finds available ports to avoid conflicts
- Node.js 16 or higher
- Docker installed and running on your machine
- Docker socket accessible (default:
/var/run/docker.sock
)
The easiest way to run Docker Web Terminal is using Docker:
# Pull the image
docker pull yourusername/docker-web-terminal
# Run the container
docker run -d \
-p 5173:5173 \
-p 3001:3001 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name docker-web-terminal \
yourusername/docker-web-terminal
The application will automatically find available ports if the default ones (5173, 3001) are in use.
-
Clone the repository:
git clone https://github.com/yourusername/docker-web-terminal.git cd docker-web-terminal
-
Install dependencies:
npm install
-
Start the application:
npm start
-
Open your browser and navigate to:
http://localhost:5173
To build the Docker image locally:
# Build the image
docker build -t docker-web-terminal .
# Run locally built image
docker run -d \
-p 5173:5173 \
-p 3001:3001 \
-v /var/run/docker.sock:/var/run/docker.sock \
--name docker-web-terminal \
docker-web-terminal
The application uses the following default ports:
5173
: Vite development server3001
: Socket.IO server
If these ports are in use, the application will automatically find and use the next available ports.
docker-web-terminal/
├── src/
│ ├── components/ # React components
│ ├── pages/ # Page components
│ └── types/ # TypeScript types
├── server/
│ ├── index.js # Backend server
│ ├── config.js # Server configuration
│ └── port-finder.js # Dynamic port allocation
├── public/ # Static assets
└── package.json # Project dependencies
To start the development server:
npm run dev
To build for production:
npm run build
- Only run this on trusted networks
- Don't expose the application to the internet
- Use proper authentication if deploying in a production environment
- Be cautious with container access permissions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React, TypeScript, and Tailwind CSS
- Uses Socket.IO for real-time communication
- Powered by Xterm.js for terminal emulation
- Docker API integration via Dockerode