Skip to main content
Glama
stop.sh898 B
#!/bin/bash # Script to stop and remove a detached container. set -e # ANSI color codes CYAN=$(tput setaf 6) RESET=$(tput sgr0) # Check if image suffix is provided if [ -z "$1" ]; then echo "Usage: $0 <image_suffix>" >&2 exit 1 fi IMAGE_SUFFIX="$1" CONTAINER_PREFIX=${CONTAINER_PREFIX:-gbox-test} # Default if not set via env CONTAINER_NAME="${CONTAINER_PREFIX}-${IMAGE_SUFFIX}" # Check if container exists if ! docker container inspect "${CONTAINER_NAME}" > /dev/null 2>&1; then echo "Container ${CYAN}${CONTAINER_NAME}${RESET} not found." exit 0 fi echo "Stopping and removing container ${CYAN}${CONTAINER_NAME}${RESET}..." # Stop the container (ignore errors if already stopped) docker stop "${CONTAINER_NAME}" > /dev/null 2>&1 || true # Remove the container docker rm "${CONTAINER_NAME}" > /dev/null 2>&1 echo "Container ${CYAN}${CONTAINER_NAME}${RESET} stopped and removed."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/babelcloud/gru-sandbox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server