Files
mtusi2026lab3/scripts/stop-one.bat
2026-10-21 13:31:36 +03:00

13 lines
327 B
Batchfile

@echo off
setlocal
set "CONTAINER_ID="
for /f "delims=" %%i in ('docker compose ps -q api 2^>nul') do (
set "CONTAINER_ID=%%i"
goto :stop_container
)
echo No API container found
exit /b 1
:stop_container
echo Stopping container %CONTAINER_ID%
docker stop "%CONTAINER_ID%"
endlocal