-2

I'm on Windows 8.1 and I'm working with a lot of scripts that automatically download Linux images and create VMs with it. Also docker images etc. and these VMs or docker images are downloading a ton of stuff via apt-get and a lot of them will also automatically download even more Linux images and create more VMs within the existing VMs etc etc. And these VMs are constantly destroyed and created again with slight changes.
At the moment the same Ubuntu, CoreOS, Debian and a ton of different docker images are basically downloaded like 10-100 times a day. This is just insane as it takes a lot of bandwidth and even more importantly time.

Unfortunately I cannot configure the router or an external firewall to cache all that http traffic. So I'm looking for a solution that works from my PC.
I'm just a bit worried about all the complicated IP and network bridging configuration of my machine and all those VMs.

So does anyone of you know a tool/script/trick to safely cache big http requests/responses without completely destroying my (virtual) network config?

2
  • Why don't you edit the scripts to use local copies of the downloads?
    – DavidPostill
    Commented Apr 7, 2016 at 13:17
  • Because I don't write all of them myself, most of them are maintained by other people and the scripts are simply part of some repository on github or the like. And there are just waaay too many scripts. And I probably don't even understand all the languages.
    – Forivin
    Commented Apr 7, 2016 at 13:25

1 Answer 1

0

You could setup a linux VM with squid and use the caching functionality on it, and set that VM as a gateway for your workstation's Internet.

for instance : http://wiki.squid-cache.org/ConfigExamples

2
  • And that would work my whole system? If I ran a batch script on the host machine directly, the VM would be able to cache the downloads?
    – Forivin
    Commented Apr 7, 2016 at 13:41
  • Depending on how the Network interface for that VM is configured it might use that gateway, but usually it wont and you should set that inside the VM. Something that comes to mind to avoid this "cache gateway" being offline breaking all VMs, is to add it on a 2nd ethernet interface in your VM with metrics so that gateway gets priority only when online and available. Commented Oct 7, 2016 at 10:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .