How can I execute predefined docker command from Java application with DockerClient?

467 Views Asked by At

I have Java Maven project with com.github.docker-java dependency. There is poor documentation and I have no idea, how to call this command:

docker run --rm -v "$(pwd)":/browsertime sitespeedio/browsertime:16.3.0 --video --visualMetrics https://www.sitespeed.io/

I know, that I can exec command directly, but I think that using Java API would be preferred.

So what Java code that uses DockerClient will run command above properly?

0

There are 0 best solutions below