Go pacman
Dockerized pacman repository with gRPC API for package management. Project goal is to quickly set up personal pacman repostitory without pain and hustle.
gRPC API is available at port 9080
by default, and should not be exposed publicly, because it executes yay
shell command under the hood. Also, this API supports reflection, so you can explore it using grpcurl
, grpclicker-vscode
or insomnia
.
Configurations
Environment variables/flags:
- ๐ -
REPO
- repo
- repository name on the web page
- ๐ -
USER
- user
- user name in system, will be used to eject yay
packages
- ๐ -
GRPC_PORT
- grpc-port
- gRPC API port for repository packages
- ๐ -
FILE_PORT
- file-port
- port for static file server to access packages
- ๐ฆ -
INIT_PKGS
- init-pkgs
- initial packages to download on start
- ๐ -
LOGS_FMT
- logs-fmt
- format for logs (can be text/json/pretty)
You can run repository via docker-compose
:
services:
pacman:
image: gitea.dancheg97.ru/dancheg97/go-pacman:latest
command: run
environment:
INIT_PKGS: onlyoffice-bin yay
LOGS_FMT: pretty
volumes:
- ./go-pacman:/var/cache/pacman/pkg
ports:
- 9080:9080
- 8080:8080
Or, alternatively, if you have virtual machine without password for sudo user,
you can install package using go:
go install gitea.dancheg97.ru/dancheg97/go-pacman@latest
And run it as a CLI programm:
go-pacman -h
go-pacman run -h