INNER CODE UNIT · Shell

DOCKER_NETWORK_ALIAS

supercharge/mongodb-github-action · stop-mongodb.sh:16

DOCKER_NETWORK_ALIAS=${13:-$MONGODB_CONTAINER_NAME}

# Best-effort cleanup, do not fail the job if cleanup fails
set +e

echo "::group::Cleaning up MongoDB container [$MONGODB_CONTAINER_NAME]"

if docker ps -a --format '{{.Names}}' | grep -Eq "^${MONGODB_CONTAINER_NAME}$"; then
  docker rm -f "$MONGODB_CONTAINER_NAME" >/dev/null 2>&1 || true
  echo "Removed container $MONGODB_CONTAINER_NAME"
else
  echo "Container $MONGODB_CONTAINER_NAME not found; nothing to clean."
fi

echo "::endgroup::"

exit 0

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…