This application provides an interface to interact with Docker containers, allowing users to list containers and serve a dashboard.
- Go > 1.20
- Docker API version > 1.45
Clone the repository to your local machine:
git clone https://github.com/surajupadhaya/containerDashboard.git
cd containerDashboard
To install the necessary dependencies, run:
go mod init github.com/docker
go mod tidy
This will download the required packages, including the Docker client.
Before running the application, ensure that Docker is running on your system.
To start the application, use:
go run main.go
The application will start an HTTP server on port 8080 and can be accessed at http://localhost:8080
/ContainerHealth: Lists all Docker containers and their status in json
/Dashboard: Serves the static dashboard HTML file.