Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

docker 测试机部署问题

  • 如果要访问host的redis,需要注意

    • 不能使用127.0.0.1,因为对于容器来说,它并不是host
    • 要使用host的内网ip
      • 前提是需要配置redis允许这个内网ip访问
  • 测试机会产生很多缓存

    • 查看缓存占用
      docker system df
      
    • 普通清理
      docker system prune
      
      • 建议就用这个,如果要把没在运行的镜像也清理干净,就要加-a参数