13 lines
327 B
Batchfile
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 |