A web-based Docker management application that provides real-time monitoring and control of Docker containers, images, and volumes through an intuitive dashboard interface.
- Container Management: Start, stop, restart, and remove Docker containers
- Image Management: Pull and remove Docker images
- Volume Management: Create and delete Docker volumes
- Network Management: Create and delete Docker networks
- Compose Management: Upload and delete Docker Compose
- Real-time Monitoring: Live dashboard with container statistics and metrics
- Authentication: Secure JWT-based authentication system
- User Roles: Admin and read-only user access levels
- Dashboard Charts: Visual representation of Docker resource usage
- WebSocket Integration: Real-time updates via Socket.IO
Before running this application, ensure you have the following installed:
- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- Node.js (version 16 or higher)
- npm (comes with Node.js)
-
Clone the repository
git clone <repository-url> cd docker_manager_project
-
Install dependencies
npm install
-
Start the PostgreSQL database
docker-compose up -d
This will create a PostgreSQL container with the database schema automatically initialized.
-
Configure environment variables
The project includes a
.envfile with JWT secrets. You can modify these if needed:ACCESS_TOKEN_SECRET=your-access-token-secret
-
Start the application
For development with auto-reload:
npm run dev
For production:
npm start
-
Access the application
Open your browser and navigate to:
http://localhost:3000
- Username:
admin - Password:
admin123
npm start- Start the production servernpm run dev- Start the development server with nodemon (auto-reload)
POST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/users- Get all users (admin only)POST /api/users- Create new user (admin only)
GET /api/containers- List all containersPOST /api/containers/:id/start- Start a containerPOST /api/containers/:id/stop- Stop a containerPOST /api/containers/:id/restart- Restart a containerDELETE /api/containers/:id- Remove a container
GET /api/images- List all imagesPOST /api/images/pull- Pull an image from registryDELETE /api/images/:id- Remove an image
GET /api/volumes- List all volumesPOST /api/volumes- Create a new volumeDELETE /api/volumes/:name- Remove a volume
GET /api/networks- List all networksPOST /api/networks- Create a new networkDELETE /api/networks/:id- Remove a networkPOST /:id/connect- connect a network to a containerPOST /:id/diconnect- diconnect a container to a network
GET /api/stacks- List all Stacks(compose)POST /api/stacks- deploy a composeDELETE /api/stacks/:name- Remove a compose
GET /health- Application and Docker connection health status
The PostgreSQL database is configured via docker-compose.yml:
- Database:
docker_manager - User:
postgres - Password:
password - Port:
5432
To modify these settings, edit the docker-compose.yml file.
The application connects to Docker via the Docker socket (/var/run/docker.sock). Ensure Docker is running on your system.
