EA-Tester icon indicating copy to clipboard operation
EA-Tester copied to clipboard

Implement Squid for caching Apt packages for CI

Open kenorb opened this issue 6 years ago • 0 comments

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"
    }
  }
  1. Now, when running containers or building Docker image, should use proxy.

kenorb avatar May 24 '19 23:05 kenorb