josegonzalez/python-github-backup

Feature: offer docs how to run in docker

EugenMayer opened this issue · 4 comments

Thank you for the great tool! We dockerized the pyhon lib to reduce the host system requirements and also isolate the run to a non privileged user to ensure everything is encapsulated if something goes wrong. See https://github.com/KontextWork/docker-github-backup

Should be as easy as

docker run --rm ghcr.io/kontextwork/github-backup --help
# or
docker run --rm ghcr.io/kontextwork/github-backup josegonzalez --repositories -t $TOKEN

See https://github.com/KontextWork/docker-github-backup for more

If there is and interest i would make an PR to update the docs

Thanks for work! I want to mention that there is an alternative implementation: https://github.com/umputun/github-backup-docker

Pull requests welcome.

@ZhymabekRoman sorry - i assume i might be biased so i try to be extra objective:
The linked docker image does run under root. Considering we are dealing with a sensible operation like backup, on a backup server, running it as root in a container can have serious issues if anything goes rough. This is why i used a non root setup.

To be fair though, the image you linked is daemonized and runs a cron job itself - this is what mine does not offer (by desing). The image i desinged is specifically as a "cli replacement without deps leaking". I do like to combine my tools with restik, thus retention handling and all those things are not needed in the tool that "pulls the snapshot". That was the design idea.

So it might be worth mentioning both - the cli "one shot" image i created and the "daemon" variant from umputun.

@josegonzalez happy to do so, just since we have 2 candidates here, you have pick on for the PR i guess. As we see, it is needed, or we end up having more of the duplicate "dockerized" repos :) Let me know

I'd rather the Dockerfile exist in this repository, and doesn't run as a daemon/cron. Folks can use their scheduler to do such a thing if they want vs running a persistent cron daemon in the image.