Skip to content

devremoto/docker-web-desktop

Repository files navigation

🐳 Docker Web Desktop

A modern, web-based Docker management interface built with Vue.js and Node.js that provides a Docker Desktop-like experience for managing containers, images, volumes, and networks.

MIT License Node.js Vue.js Docker

Manage your Docker containers, images, volumes, and networks with an intuitive web interface that rivals Docker Desktop

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ πŸ› οΈ Features β€’ 🀝 Contributing

✨ Features

🎨 Modern Interface

  • πŸ“± Responsive Design: Works on desktop, tablet, and mobile
  • 🎯 Intuitive UI: Clean, user-friendly interface
  • 🌈 Bootstrap 5: Modern styling and components
  • πŸ” Smart Port Detection: Automatic protocol suggestions
  • πŸ“‹ Detailed Views: Comprehensive resource information
  • πŸš€ Fast Performance: Optimized for speed and efficiency

🐳 Docker Management

  • Containers: Start, stop, restart, remove, and view logs
  • Images: View, remove, and inspect Docker images
  • Volumes: Manage Docker volumes with usage information
  • Networks: Configure and manage Docker networks
  • Real-time Updates: WebSocket integration for live status updates
  • Resource Statistics: Dashboard with system overview

πŸ—οΈ Architecture

docker-web-desktop/
β”œβ”€β”€ πŸ–₯️ backend/                 # Node.js Express API Server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/            # RESTful API endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ containers.js  # Container management
β”‚   β”‚   β”‚   β”œβ”€β”€ images.js      # Image operations
β”‚   β”‚   β”‚   β”œβ”€β”€ volumes.js     # Volume management
β”‚   β”‚   β”‚   └── networks.js    # Network configuration
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── docker.js      # Docker API integration
β”‚   β”‚   └── server.js          # Main application server
β”‚   └── package.json
β”‚
β”œβ”€β”€ 🎨 frontend/                # Vue.js Single Page Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/        # Reusable Vue components
β”‚   β”‚   β”‚   β”œβ”€β”€ Sidebar.vue    # Navigation sidebar
β”‚   β”‚   β”‚   β”œβ”€β”€ ContainerCard.vue
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ views/             # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ DashboardView.vue
β”‚   β”‚   β”‚   β”œβ”€β”€ ContainersView.vue
β”‚   β”‚   β”‚   β”œβ”€β”€ ResourcesView.vue
β”‚   β”‚   β”‚   β”œβ”€β”€ InstallationView.vue
β”‚   β”‚   β”‚   └── AboutView.vue
β”‚   β”‚   β”œβ”€β”€ stores/            # Pinia state management
β”‚   β”‚   β”œβ”€β”€ services/          # API communication layer
β”‚   β”‚   β”œβ”€β”€ router/            # Vue Router configuration
β”‚   β”‚   └── main.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ πŸ“ README.md
β”œβ”€β”€ πŸ“‹ instructions.txt
└── πŸ”§ Configuration files

πŸš€ Quick Start

Prerequisites

Before you begin, ensure you have the following installed:

Requirement Version Download
🟒 Node.js 18+ nodejs.org
🐳 Docker Desktop Latest docker.com
πŸ“¦ npm 8+ Included with Node.js
πŸ”§ Git Latest git-scm.com

Installation

  1. Clone the repository

    git clone https://github.com/devremoto/docker-web-desktop.git
    cd docker-web-desktop
  2. Install dependencies

    # Backend dependencies
    cd backend && npm install
    
    # Frontend dependencies
    cd ../frontend && npm install
  3. Start the application

    # Terminal 1: Start backend (from project root)
    cd backend && npm run dev
    
    # Terminal 2: Start frontend (from project root)
    cd frontend && npm run dev
  4. Access the application

πŸ’‘ Tip: Use the provided batch scripts on Windows: start-backend.bat and start-frontend.bat

πŸ“– Documentation

πŸ”Œ API Reference

πŸ—‚οΈ Container Endpoints
Method Endpoint Description
GET /api/containers List all containers
GET /api/containers/:id Get container details
POST /api/containers/:id/start Start container
POST /api/containers/:id/stop Stop container
DELETE /api/containers/:id Remove container
GET /api/containers/:id/logs Get container logs
πŸ–ΌοΈ Image Endpoints
Method Endpoint Description
GET /api/images List all images
GET /api/images/:id Get image details
DELETE /api/images/:id Remove image
πŸ’Ύ Volume Endpoints
Method Endpoint Description
GET /api/volumes List all volumes
DELETE /api/volumes/:name Remove volume
🌐 Network Endpoints
Method Endpoint Description
GET /api/networks List all networks
DELETE /api/networks/:id Remove network

πŸ› οΈ Technology Stack

Backend Technologies

  • Node.js Node.js - JavaScript runtime
  • Express Express.js - Web framework
  • Docker Dockerode - Docker API client
  • Socket.io Socket.IO - Real-time communication

Frontend Technologies

  • Vue.js Vue.js 3 - Progressive framework
  • Bootstrap Bootstrap 5 - CSS framework
  • Pinia Pinia - State management
  • Vite Vite - Build tool

βš™οΈ Configuration

Environment Variables

Create a .env file in the backend directory:

# Server Configuration
PORT=3000
NODE_ENV=development

# Docker Configuration (automatically detected)
# DOCKER_SOCKET_PATH=/var/run/docker.sock    # Linux/Mac
# Windows uses: \\.\pipe\docker_engine

# CORS Settings
FRONTEND_URL=http://localhost:5173

Port Configuration

Service Default Port Environment Variable
Backend API 3000 PORT
Frontend Dev 5173 Configured in vite.config.js
WebSocket 3000 Same as backend

πŸ”§ Development

Available Scripts

Backend Scripts

npm start          # Start production server
npm run dev        # Start development with nodemon
npm test           # Run tests
npm run lint       # Run ESLint

Frontend Scripts

npm run dev        # Start development server
npm run build      # Build for production
npm run preview    # Preview production build
npm run lint       # Run ESLint

πŸ› Debugging & Troubleshooting

πŸ”§ Common Issues

Docker Connection Issues

# Check Docker status
docker version
docker ps

# On Linux/Mac - Fix permissions
sudo chmod 666 /var/run/docker.sock
sudo usermod -aG docker $USER

# Restart Docker Desktop

Port Conflicts

# Find process using port
netstat -ano | findstr :3000    # Windows
lsof -i :3000                   # Mac/Linux

# Kill process
taskkill /PID <PID> /F          # Windows
kill -9 <PID>                   # Mac/Linux

Node.js Version Issues

# Check version
node --version

# Clear npm cache
npm cache clean --force

# Reinstall dependencies
rm -rf node_modules package-lock.json
npm install

🚒 Deployment

Production Build

  1. Build the frontend

    cd frontend
    npm run build
  2. Configure backend for production

    cd backend
    npm install --production
  3. Start production server

    npm start

Docker Deployment

# Example Dockerfile
FROM node:18-alpine

WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

COPY . .
EXPOSE 3000

CMD ["npm", "start"]

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • πŸ“ Follow existing code style
  • βœ… Add tests for new features
  • πŸ“š Update documentation
  • πŸ§ͺ Test thoroughly before submitting

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Adilson de Almeida Pedro

πŸ’– Support

If you find this project helpful, consider supporting its development:

  • ⭐ Star this repository
  • πŸ› Report bugs and suggest features
  • 🀝 Contribute to the codebase
  • β˜• Buy me a coffee via Ko-fi

πŸ™ Acknowledgments

  • 🐳 Docker team for the amazing containerization platform
  • 🎨 Vue.js team for the excellent frontend framework
  • 🎯 Bootstrap team for the beautiful UI components
  • 🌟 Open Source Community for the incredible tools and libraries

Built with ❀️ by Adilson Pedro

Star ⭐ this repository if you find it useful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •