August 2018
Intermediate to advanced
372 pages
9h 29m
English
Even when generating a Docker image, using Docker commands is not hard or complex; it's always a good idea to automate all of these steps as much as we can. The Docker Gradle plugin is pretty useful for accomplishing this task. Let's learn how to make this part of our application.
First of all, we need to include the repository that contains the plugin and the plugin itself as a dependency within the buildscript section, as shown in the following code:
buildscript { ... repositories { ... maven { url "https://plugins.gradle.org/m2/" } } dependencies { ... classpath('gradle.plugin.com.palantir.gradle.docker:gradledocker: 0.13.0') }}
Later, the plugin should be applied to the project in the same way as any other plugin—using ...
Read now
Unlock full access