Docker - Portainer - adding uroni/urbackup template


#1

urbackup has docker container and its awesome

But I recently learn about Portainer which is an opensource web GUI for docker managment and it seems pretty well made.
It uses template system which is pretty straight forward JSON file not that far from docker-compose.yml
Here is documentation for it

cfstras/urbackup is already there as a template, but uroni/urbackup seems to be coming straight from the source and is more actively maintained so thats the one I would like to rather use from there.
So maybe pull request to portainer/templates? if people behind urbackup would want to keep it in their hands.

Also this is just my preference since I am storing backups on btrfs, but I would go for "privileged": true as default.
Dunno if its an issue that isolation would not be as tight and the container would get access to block deviceā€¦ I duno rather that than having to have extra steps and dealing with stuff not working out of the box for some.

I am playing with this myself a bit, here is my take on a portainer template

also btw, portainer just had switch to 1.20 version where they changed the template format
so in 1.20 if you get red error in top right corner when entering template section, the url in settings needs to be changed to see their templates.

EDIT

I played with this a bunch, as well as with docker image.
Is it only me or is UDP network traffic not getting in to the container and so there are some problems with discovery?

EDIT2

OK, I realized its not an udp thing, but that the server in the container is on a different subnet than the clients, that network is just bridged. So again, losing bit of the isolation the container needs to run on the hosts network using --network host in the docker command. I edited my template.

Similarly something like this should be on dockerhub info page
docker run -d --privileged --network host --name urbackup-server-1 --restart always -v /media/backups:/backups -v /media/database:/var/urbackup -p 55413-55415:55413-55415 -p 35623:35623/udp uroni/urbackup-server