REF: https://gist.github.com/afloesch/ea855b30cfb9f157dda8c207d40f05c0
For this gist, I'll use Jenkins custom image method to install Docker.
You could use docker-compose.yaml or use docker command to run your custom image.
Note: For M1, you could enable
platformindocker-compose.yamlfile.