ssh-docker-stop

Stop Docker containers gracefully with SIGTERM and SIGKILL signals.

6|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-stop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh-docker-stop
Source: https://github.com/Nightreaver/python-ssh-mcp/tree/main/skills/ssh-docker-stop
Command: npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-stop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill provides a controlled method to stop Docker containers, ensuring graceful shutdown with the option to follow up with forceful termination if necessary.

Core Features & Use Cases

  • Graceful Shutdown: Initiates a SIGTERM signal to the container for a controlled stop, followed by a SIGKILL if the container does not terminate within the timeout period.
  • Container Identification: Validates the container name or ID to ensure the correct container is targeted.
  • Audit Logging: Returns a detailed ExecResult with the container name and exit code for tracking and logging purposes.
  • Use Case: Use this Skill to safely stop a web server container without interrupting its service, allowing for a controlled shutdown.

Quick Start

Use the ssh_docker_stop skill to stop the container 'nginx' on host 'docker1'.

Frequently Asked Questions about ssh-docker-stop

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

FAQPage Schema
How do I gracefully stop a Docker container?

To gracefully stop a Docker container, this skill initiates a SIGTERM signal for a controlled shutdown, followed by a SIGKILL if the process exceeds its timeout period.

What is the best way to ensure a Docker container terminates over SSH without data loss?

Ensuring Docker container termination over SSH requires validating the container ID and applying SIGTERM signals first. This controlled method prevents data loss before resorting to forceful SIGKILL termination.

Can I log the exit code when I shut down a Docker container remotely?

Yes, you can log the exit code when shutting down a Docker container remotely. The process returns a detailed ExecResult containing the container name and exit code for audit logging.

Does a graceful Docker shutdown validate the container name before stopping?

Yes, a graceful Docker shutdown validates the target container name or ID before sending termination signals. This validation ensures the correct container receives the SIGTERM and SIGKILL commands.

When should I expect a SIGKILL during Docker container management?

You should expect a SIGKILL during Docker container management when the initial SIGTERM signal fails to terminate the process within the specified timeout period, ensuring proper termination.