destroy.bat 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 stop wasm-toolchain-ctr>nul 2>nul
  21. docker rm wasm-toolchain-ctr>nul 2>nul
  22. echo "Done."
  23. )
  24. call docker inspect wasm-debug-server-ctr>nul 2>nul
  25. IF %ERRORLEVEL% EQU 0 (
  26. echo "Stopping and removing wasm-debug-server-ctr container..."
  27. docker stop wasm-debug-server-ctr>nul 2>nul
  28. docker rm wasm-debug-server-ctr>nul 2>nul
  29. echo "Done."
  30. )
  31. echo "Clean up docker containers successfully."