dockerfiles icon indicating copy to clipboard operation
dockerfiles copied to clipboard

Noting cached persistently

Open Alsan opened this issue 3 years ago • 5 comments

Hello, I'm trying to build a "Download server" for our offline development environment by using polipo and docker. I've setup the polipo in my own notbook to test the ability of polipo, so far the cache ability is great, but I can't see any download object persist in the cached folder, so what's wrong with my config?

version: "3.8"

services:
  polipo:
    image: vimagick/polipo
    container_name: polipo
    hostname: polipo
    restart: unless-stopped
    command:
      cacheIsShared=false
      socksParentProxy=172.17.0.1:10808
      socksProxyType=socks5
      chunkHighMark=819200
      objectHighMark=128
      pmmFirstSize=16384
      pmmSize=8192
      logLevel=0xFF
    ports:
      - 8123:8123/tcp
    volumes:
      - polipo-cache:/var/cache/polipo:rw
      - polipo-www:/usr/share/polipo/www:ro
    networks:
      - polipo

volumes:
  polipo-cache:
  polipo-www:

networks:
  polipo:
    driver: bridge

Alsan avatar Apr 13 '21 07:04 Alsan

Try to append diskCacheRoot=/var/cache/polipo to command.

read more

vimagick avatar Apr 13 '21 07:04 vimagick

This works, but all files persisted are 403 or 404 replies from the upstream, no regular 200 replies, or the expected downloadable internet objects. What else I'm missing?

Alsan avatar Apr 13 '21 14:04 Alsan

HTTPS connections are not cached

vimagick avatar Apr 14 '21 08:04 vimagick

Ok, I see. Is there anyway I can make it work as expected? I need it to cache everything, so that I can copy the cached object to offline server manually, or can you suggest me any other similar solution that archive this? Thanks a lot.

Alsan avatar Apr 14 '21 08:04 Alsan

Possible, but not easy.

Please read: https://serverfault.com/questions/350967/is-there-any-way-to-cache-https-requests-in-a-proxy-server

vimagick avatar Apr 14 '21 08:04 vimagick