dockerServerMangerGoMCP

module
v0.0.0-...-bd1a880 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2025 License: MIT

README

Docker Server Manager Go MCP

GitHub release (latest by date) CI Release codecov Go Report Card GoDoc Security Rating GitHub Workflow Status GitHub Repo stars GitHub issues GitHub pull requests GitHub last commit GitHub contributors GitHub code size in bytes

Note: This project is in early development and may not be fully functional. Use at your own risk.

Docker Server Manager Go MCP (DSM) is a comprehensive Go-based REST API that provides a powerful and flexible interface for managing Docker containers, images, volumes, networks, and Docker Compose deployments.

Overview

This project offers a complete solution for Docker management through a web API, featuring JWT authentication, robust CRUD operations, and support for all major Docker functionality. The API supports both PostgreSQL and SQLite databases for persistent storage, managed automatically using GORM.

Key Features
  • Complete Docker Management:

    • Container lifecycle management (create, start, stop, remove)
    • Image operations (pull, build, tag, remove)
    • Volume management (create, list, remove)
    • Network operations (create, connect containers, remove)
    • File operations (copy to/from containers)
    • Command execution within containers
  • Docker Compose Support:

    • Parse and validate Docker Compose YAML files
    • Deploy multi-container applications
    • Track deployment status
    • Scale services up or down
    • Manage resources created by Compose deployments
  • Security:

    • JWT authentication and authorization
    • Role-based access control
    • Token blacklisting and refresh
    • Password hashing and secure storage
  • API:

    • RESTful API design with Gin framework
    • Comprehensive API documentation
    • Client SDK for Go applications
    • Swagger/OpenAPI specification
  • Database Support:

    • PostgreSQL for production environments
    • SQLite for development and testing
    • Automatic schema migrations
    • GORM-based data access layer

Getting Started

Prerequisites
  • Go 1.24.1 or later
  • Docker 24.0.0 or later
  • PostgreSQL (for production) or SQLite (for development)
Installation
  1. Clone the repository:

    git clone https://github.com/threatflux/dockerServerMangerGoMCP.git
    cd dockerServerMangerGoMCP
    
  2. Install dependencies:

    go mod download
    
  3. Build the application:

    make build
    
  4. Run the server:

    ./bin/ghactions-updater
    
Docker Deployment

To run the application in Docker:

docker-compose up -d

API Documentation

Complete API documentation is available in the /docs directory:

Development

For detailed development guidelines, see:

Building and Testing
# Run tests
make test

# Run linting
make lint

# Check for security issues
make security

License

Copyright © 2025 ThreatFlux. All rights reserved.

Author

Wyatt Roersma

Directories

Path Synopsis
cmd
server command
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
api
docker/compose
Package compose provides functionality for Docker Compose operations
Package compose provides functionality for Docker Compose operations
docker/compose/converter
Package converter provides functionality for converting Docker Compose structures to Docker API structures
Package converter provides functionality for converting Docker Compose structures to Docker API structures
docker/compose/orchestrator
Package orchestrator provides functionality for orchestrating Docker Compose deployments
Package orchestrator provides functionality for orchestrating Docker Compose deployments
docker/compose/resources
Package resources provides functionality for managing Docker Compose resources
Package resources provides functionality for managing Docker Compose resources
docker/compose/status
Package status provides functionality for monitoring Docker Compose service status
Package status provides functionality for monitoring Docker Compose service status
docker/compose/types
Package types provides common structures for Docker Compose functionality
Package types provides common structures for Docker Compose functionality
docker/container
Package container provides functionality for managing Docker containers.
Package container provides functionality for managing Docker containers.
docker/container/exec
Package exec provides functionality for executing commands in Docker containers.
Package exec provides functionality for executing commands in Docker containers.
docker/container/file
Package file provides utilities for container file operations
Package file provides utilities for container file operations
docker/container/lifecycle
Package lifecycle implements Docker container lifecycle operations.
Package lifecycle implements Docker container lifecycle operations.
docker/container/monitor
Package monitor provides utilities for monitoring Docker containers
Package monitor provides utilities for monitoring Docker containers
docker/container/state
Package state provides utilities for container state management
Package state provides utilities for container state management
docker/network
Package network provides functionality for Docker network management
Package network provides functionality for Docker network management
docker/network/manager
Package manager provides the implementation of the network service interface
Package manager provides the implementation of the network service interface
docker/registry
Package registry provides functionality for managing Docker registries and credentials.
Package registry provides functionality for managing Docker registries and credentials.
docker/security
Package security provides container security scanning and secure default configurations
Package security provides container security scanning and secure default configurations
docker/volume
Package volume provides functionality for Docker volume management
Package volume provides functionality for Docker volume management
docker/volume/inspector
Package inspector provides functionality for inspecting Docker volumes
Package inspector provides functionality for inspecting Docker volumes
docker/volume/manager
Package manager provides a concrete implementation of the volume.Service interface
Package manager provides a concrete implementation of the volume.Service interface
interfaces
Package interfaces defines common interfaces used across the application
Package interfaces defines common interfaces used across the application
models
Package models provides data structures used throughout the application
Package models provides data structures used throughout the application
utils/archiver
Package archiver provides utilities for working with container file archives
Package archiver provides utilities for working with container file archives
pkg
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL