Docker Compose file for Percona XtraBackup

I want to install Percona XtraBackup with Docker Compose. I was searching the internet and did not find a docker compose file. The XtraBackup documentation shows only how to run it directly. Anybody can help with a sample docker compose file to adapt?

Xtrabackup is a one-shot utility(ie: you run it once, then it exits). It’s my understanding that you’d use docker compose to create a container with a long-running process (ie: a server/service). or am I misunderstanding what you are trying to accomplish? xtrabackup requires disk access to the mysql data dir and also needs login capabilities to mysql. Can you do that from a sidecar container?