docker-expert

Detect container runtimes and manage Docker via CLI or API for Go applications.

3|2|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/middleware-labs/mw-injector --skill docker-expert-middleware-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-expert
Source: https://github.com/middleware-labs/mw-injector/tree/main/.claude/skills/docker-expert
Command: npx skills add https://github.com/middleware-labs/mw-injector --skill docker-expert-middleware-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides guidance on detecting container runtimes, interacting with Docker via CLI and API, instrumenting Go applications inside containers, and debugging containerized workloads.

Core Features & Use Cases

  • Container Runtime Detection: detect runtime from /proc/<pid>/cgroup; supports runtimes including Docker, Podman, containerd, and cri-o.
  • Docker API via CLI: use docker inspect, docker ps, and docker exec to manage containers.
  • Docker Compose Detection: inspect labels to identify compose projects and services.
  • Container Instrumentation Patterns: mount agents into containers and set JAVA_TOOL_OPTIONS or equivalent for instrumentation.
  • Container Networking: fetch container IPs and exposed ports for integration and testing.
  • Debugging Containers: access shells, view logs, and inspect runtime state; optionally use the Go Docker client for programmatic control.
  • Go Client Library: use official Docker client library when CLI is insufficient.

Quick Start

Run the Docker Expert Guide steps to detect runtimes, instrument containers, and debug Go applications.

Frequently Asked Questions about docker-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect container runtimes for my Go application?

Detect container runtimes by parsing /proc/<pid>/cgroup to identify Docker, Podman, containerd, or cri-o environments, enabling accurate runtime discovery and conditional instrumentation logic for your Go application.

What is the best way to inspect Docker Compose labels for service discovery?

Inspect Docker Compose labels using docker inspect to identify compose projects and services, allowing you to programmatically map containerized Go workloads to their logical compose service definitions for integration testing and debugging.

How to instrument Go applications running inside Docker containers?

Instrument Go applications inside containers by mounting agent volumes into the target container and setting environment variables like JAVA_TOOL_OPTIONS or equivalent, enabling runtime monitoring and debugging without modifying the application image.

Does this approach support fetching container IPs and exposed ports for networking tests?

Yes, you can fetch container IPs and exposed ports using docker inspect and container networking utilities, providing the necessary network endpoints for integration testing and validating Docker networking configurations for Go services.

When should I use the Go Docker client library instead of the Docker CLI?

Use the official Go Docker client library when CLI commands are insufficient for your automation needs, offering programmatic control over container management, runtime state inspection, and Docker API operations within Go code.

Can I debug containerized Go services by accessing shells and viewing logs?

Yes, debug containerized Go services by using docker exec to access shells, docker logs to view output streams, and docker inspect to check runtime state, supporting comprehensive troubleshooting of containerized workloads.