anatol / pacoloco

Caching proxy server for Arch Linux pacman
MIT License
199 stars 30 forks source link

Docker issues when updating pacman #98

Closed Gibbz closed 6 months ago

Gibbz commented 6 months ago

I get the following error on my docker setup. My cache folder is empty so updating via pacman fails....

pacoloco    | pacoloco.go:98: Reading config file from /etc/pacoloco.yaml
pacoloco    | prefetch.go:45: The prefetching routine will be run on 2024-01-19 03:00:00.000139119 +1030 ACDT m=+14394.488631048
pacoloco    | prefetch_db.go:78: Creating /var/cache/pacoloco/sqlite-pkg-cache.db
pacoloco    | pacoloco.go:117: Gathering size failed for  archlinux
pacoloco    | pacoloco.go:117: Gathering size failed for  quarry
pacoloco    | pacoloco.go:117: Gathering size failed for  sublime
pacoloco    | pacoloco.go:117: Gathering size failed for  archlinux-reflector
pacoloco    | pacoloco.go:141: Starting server at port 9129
pacoloco    | purge.go:67: lstat /var/cache/pacoloco/pkgs/archlinux: no such file or directory
pacoloco    | purge.go:67: lstat /var/cache/pacoloco/pkgs/quarry: no such file or directory
pacoloco    | purge.go:67: lstat /var/cache/pacoloco/pkgs/sublime: no such file or directory
pacoloco    | purge.go:67: lstat /var/cache/pacoloco/pkgs/archlinux-reflector: no such file or directory

pacoloco.yaml

port: 9129
cache_dir: /var/cache/pacoloco
purge_files_after: 360000 # 360000 seconds or 100 hours, 0 to disable
download_timeout: 3600 # download will timeout after 3600 seconds
repos:
  archlinux:
    urls:
      - http://mirror.internode.on.net/pub/archlinux/
      - http://ftp.iinet.net.au/pub/archlinux/
      - http://mirror.lty.me/archlinux
      - http://mirrors.kernel.org/archlinux
  quarry:
    url: http://pkgbuild.com/~anatolik/quarry/x86_64
  sublime:
    url: https://download.sublimetext.com/arch/stable/x86_64
  archlinux-reflector:
    mirrorlist: /etc/pacman.d/reflector_mirrorlist # Be careful! Check that pacoloco URL is NOT included in that file!
user_agent: Pacoloco/1.2

docker-compose

version: '3'

services:
  pacoloco:
    container_name: pacoloco
    image: ghcr.io/anatol/pacoloco
    environment:
      - PUID=1000
      - PGID=1001
    ports:
      - "9129:9129"
    volumes:
      - ${HOME}/Docker/pacoloco/cache:/var/cache/pacoloco
      - ${HOME}/Docker/pacoloco/config/pacoloco.yaml:/etc/pacoloco.yaml
      - ${HOME}/Docker/pacoloco/config/reflector_mirrorlist:/etc/pacman.d/reflector_mirrorlist
      - /etc/localtime:/etc/localtime:ro
    restart: always
Gibbz commented 6 months ago

fixed the issue by creating the folders in the cache.