Com.palantir.docker: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Gradle Plugins =Overview= <syntaxhighlight lang='groovy'> buildscript { ext { ... dockerGradleVersion = '0.2...")
 
Line 7: Line 7:
<syntaxhighlight lang='groovy'>
<syntaxhighlight lang='groovy'>
buildscript {
buildscript {
     ext {
     ext {
         ...
         ...
         dockerGradleVersion = '0.20.1'
         dockerGradleVersion = '0.20.1'
     }
     }
     repositories {
     repositories {
         mavenCentral()
         mavenCentral()
         maven { url "https://plugins.gradle.org/m2/" }
         maven { url "https://plugins.gradle.org/m2/" }

Revision as of 08:15, 6 February 2019

Internal

Overview

buildscript {

    ext {

        ...
        dockerGradleVersion = '0.20.1'
    }

    repositories {

        mavenCentral()
        maven { url "https://plugins.gradle.org/m2/" }
    }
    dependencies {
        ...
        classpath("gradle.plugin.com.palantir.gradle.docker:gradle-docker:${dockerGradleVersion}")
    }
}

...
apply plugin: 'com.palantir.docker'
...

group = 'playground.example'

...

docker {
    
    dependsOn build
    name "${project.group}/${bootJar.baseName}"
    files bootJar.archivePath
    buildArgs(['JAR_FILE': "${bootJar.archiveName}"])
}