Docker is a consistent way of reproducible steps and to minimize the efforts one has to put on setting up selenium-grid infrastructure , in this repo you will find all the setup with startup and teardown scripts to setup selenium grid using 2 proven flavors :
./gradlew clean test
./gradlew clean test -PdockerSetup=zalenium -DREMOTE_DRIVER=true
./gradlew clean test -PdockerSetup=selenoid -DREMOTE_DRIVER=true