EA31337 / EA-Tester

🐳📈 Headless Forex backtesting for MetaTrader platform using Docker
https://ea31337.github.io/EA-Tester
MIT License
110 stars 83 forks source link

Implement Squid for caching Apt packages for CI #148

Open kenorb opened 5 years ago

kenorb commented 5 years ago

The goal is to implement caching, so the provision task finishes quicker for local or CI builds, as it doesn't have to download Apt packages over and over again.

One potential method is to:

  1. Run docker-squid as container on port 3128 (docker-compose run Squid). Make sure /srv/docker/squid/cache is created on the host machine and cached by CI (cache section in .travis.yml).
  2. Configure Docker to use proxy pointing to Squid in ~/.docker/config.json:
    "proxies": {
    "default": {
      "httpProxy": "http://172.17.0.1:8888",
      "httpsProxy": "http://172.17.0.1:8888"
    }
    }
  3. Now, when running containers or building Docker image, should use proxy.