Travis CI's Ubuntu 20.04 (Focal Fossa) environment includes everything Batect requires, so all that needs to be done to use Batect with Travis CI is to configure this environment and enable the Docker service.
Adding the following to your
.travis.yml file selects the Ubuntu 20.04 environment and enables Docker:
You can see a full example of using Batect with Travis CI in the Java sample project.
If you're using caches, you can persist these between builds with the following configuration: