soulteary / apt-proxy

[Ubuntu / Debian / CentOS / Alpine] Lightweight APT / YUM / APK CHACHE PROXY with only 2MB+ size!
https://soulteary.com/2022/11/20/linux-package-download-acceleration-tool-apt-proxy.html
Apache License 2.0
177 stars 19 forks source link

使用-cachedir参数后,cache size和number of files都显示N/A,无法正常显示数值。 #15

Open rayblade opened 1 year ago

rayblade commented 1 year ago

使用-cachedir参数后,cache size和number of files都显示N/A,无法正常显示数值。

zkc226 commented 1 year ago

代码里面写死了统计路径是 ./.aptcache,真机环境下可以通过软链接指向目标目录解决,容器环境下可以通过volume挂载解决:

services:
  apt-proxy:
    image: soulteary/apt-proxy:v0.5.3
    container_name: apt-proxy
    hostname: apt-proxy
    command:
      - --mode=all
      - --port=80
      - --ubuntu=cn:aliyun
      - --debian=cn:aliyun
      - --alpine=cn:aliyun
      - --centos=cn:aliyun
      - --cachedir=/.aptcache
    volumes:
      - ./var/aptcache:/.aptcache:rw