install.bat 833 B

1234567891011121314151617181920212223242526272829
  1. @echo off
  2. rem pip install docker
  3. set basepath=%~dp0
  4. setx /M DEVERPATH "%basepath%src/"
  5. setx /M PATH "%PATH%;%DEVERPATH%"
  6. set dockerdaemon=%USERPROFILE%/.docker/daemon.json
  7. (
  8. echo {
  9. echo "builder": { "gc": { "defaultKeepStorage": "20GB", "enabled": true } },
  10. echo "experimental": false,
  11. echo "features": { "buildkit": true },
  12. echo "registry-mirrors": [
  13. echo "https://docker.mirrors.ustc.edu.cn",
  14. echo "https://registry.docker-cn.com",
  15. echo "http://hub-mirror.c.163.com",
  16. echo "https://mirror.ccs.tencentyun.com"
  17. echo ],
  18. echo "insecure-registries" : ["docker.dever.cc"]
  19. echo }
  20. ) > %dockerdaemon%
  21. set docker="Docker Desktop.exe"
  22. tasklist|find /i %docker%
  23. if %errorlevel%==0 (
  24. taskkill /f /im %docker%
  25. )
  26. start "docker" "%PROGRAMFILES%"\Docker\Docker\%docker%
  27. echo "install success!"
  28. pause