vimagick / dockerfiles

:whale: A curated list of delicious docker recipes 🇺🇦🇮🇱 (Let's Fight Against Dictatorship)
https://hub.docker.com/u/vimagick/
3.14k stars 788 forks source link

Noting cached persistently #176

Open Alsan opened 3 years ago

Alsan commented 3 years ago

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
vimagick commented 3 years ago

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

read more

Alsan commented 3 years ago

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?

vimagick commented 3 years ago

HTTPS connections are not cached

Alsan commented 3 years ago

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.

vimagick commented 3 years ago

Possible, but not easy.

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