There's a branch of this that also sets you up with Selenium, Chrome and Chromedriver in the Docker image!
$ cd /path/to/Projects
$ git clone --depth 1 https://github.com/cs-cordero/kotlin-gradle-dockerfile-starter.git [your-new-project]
$ cd [your-new-project]
$ rm -r .git
$ git init
$ git add .
$ git commit -m "Bootstrapped from https://github.com/cs-cordero/kotlin-gradle-dockerfile-starter"Open the gradle.properties file and change the following values to what you want:
- name.  The project name, used in many places, notably the name of the shadow jar will be "${project.name}-${project.version}.jar"
- version. The project version, used in many places, notably the name of the shadow jar will be "${project.name}-${project.version}.jar"
- group. See here.
- imageRepository.  A component of the image tag (repo/name:version)
- imageName.  A component of the image tag (repo/name:version). Defaults toproject.name.
- createLatestTag.  If this is set to any value, buildImagewill also create a:latestimage tag. Remove it entirely if you don't want this.
$ ./gradlew build
$ ./gradlew run
$ ./gradlew buildImage- Comes equipped with a build.gradle.kts that configures a Shadow Jar plugin to include the Kotlin stdlib when creating Jar.
- Also configures the buildImagetask, which will create a Docker image for you.