destroy.bat 962 B

123456789101112131415161718192021222324252627282930313233343536
  1. @REM Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. @REM SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. @echo off
  4. call docker --version>nul 2>nul
  5. IF %ERRORLEVEL% GTR 0 (
  6. echo "Docker is not installed, please install docker desktop firstly."
  7. echo
  8. exit /b 1
  9. )
  10. call docker images>nul 2>nul
  11. IF %ERRORLEVEL% GTR 0 (
  12. echo "Docker is not ready, please lanuch docker desktop firstly."
  13. echo
  14. exit /b 2
  15. )
  16. echo "Prepare to clean up the docker containers..."
  17. call docker inspect wasm-toolchain-ctr>nul 2>nul
  18. IF %ERRORLEVEL% EQU 0 (
  19. echo "Stopping and removing wasm-toolchain-ctr container..."
  20. docker rm -f wasm-toolchain-ctr>nul 2>nul
  21. echo "Done."
  22. )
  23. call docker inspect wasm-debug-server-ctr>nul 2>nul
  24. IF %ERRORLEVEL% EQU 0 (
  25. echo "Stopping and removing wasm-debug-server-ctr container..."
  26. docker rm -f wasm-debug-server-ctr>nul 2>nul
  27. echo "Done."
  28. )
  29. echo "Clean up docker containers successfully."