├── .github ├── dependabot.yml └── workflows │ ├── cd.yml │ ├── ci.yml │ └── update-gradle-wrapper.yml ├── .gitignore ├── README.md ├── build-and-run-locally ├── build.gradle.kts └── docker │ ├── Dockerfile │ ├── example.txt │ └── subdirectory │ ├── gattaca.jpg │ └── gattaca.txt ├── build-push-and-run-remotely ├── build.gradle.kts └── docker │ ├── Dockerfile │ ├── example.txt │ └── subdirectory │ ├── gattaca.jpg │ └── gattaca.txt ├── build-with-auth ├── Dockerfile └── build.gradle.kts ├── build-with-buildargs ├── .dockerignore ├── Dockerfile └── build.gradle.kts ├── build-with-dockerignore ├── .dockerignore ├── Dockerfile ├── build.gradle.kts ├── ensure-dockerignore.sh ├── file-to-be-ignored ├── ignoreddirectory │ └── inside-an-ignored-directory └── subdirectory │ ├── a-file-to-keep-in-the-build-context │ └── another-file-to-be-ignored ├── build-with-tag ├── build.gradle.kts └── docker │ ├── Dockerfile │ ├── example.txt │ └── subdirectory │ ├── gattaca.jpg │ └── gattaca.txt ├── build.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── img ├── docker-logo.png └── gradle-logo.png ├── issue-41 └── build.gradle.kts ├── issue-64 └── build.gradle.kts ├── push-and-pull-with-auth └── build.gradle.kts ├── run-exec-and-copy-locally └── build.gradle.kts ├── run-with-data-volume └── build.gradle.kts ├── run-with-user ├── build.gradle.kts └── docker │ └── Dockerfile └── settings.gradle.kts /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "daily" 12 | - package-ecosystem: "gradle" 13 | directory: "/" 14 | schedule: 15 | interval: "daily" 16 | open-pull-requests-limit: 20 17 | -------------------------------------------------------------------------------- /.github/workflows/cd.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: CD 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - master 8 | jobs: 9 | cd-build: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | with: 14 | fetch-depth: 1 15 | - name: Set up JDK 16 | uses: actions/setup-java@v4 17 | with: 18 | distribution: 'zulu' 19 | java-version: 8 20 | - name: clean build 21 | run: ./gradlew clean build dockerInfo --no-daemon --info --stacktrace 22 | timeout-minutes: 10 23 | ... 24 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: CI 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches-ignore: 7 | - main 8 | - master 9 | jobs: 10 | ci-build: 11 | strategy: 12 | matrix: 13 | os: [ ubuntu-latest, windows-latest ] 14 | #os: [ ubuntu-latest, windows-latest, macos-latest ] 15 | java: [ 8, 17 ] 16 | runs-on: ${{ matrix.os }} 17 | steps: 18 | - uses: actions/checkout@v4 19 | with: 20 | fetch-depth: 1 21 | - name: Set up JDK 22 | uses: actions/setup-java@v4 23 | with: 24 | distribution: 'zulu' 25 | java-version: ${{ matrix.java }} 26 | - name: docker version 27 | run: docker version 28 | - name: docker info 29 | run: docker info 30 | - name: java version 31 | run: java -version 32 | - name: clean build 33 | run: ./gradlew clean build dockerInfo --no-daemon --info --stacktrace 34 | timeout-minutes: 10 35 | ... 36 | -------------------------------------------------------------------------------- /.github/workflows/update-gradle-wrapper.yml: -------------------------------------------------------------------------------- 1 | name: Update Gradle Wrapper 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | # "weekly" https://crontab.guru/every-week 7 | - cron: "0 0 * * 0" 8 | 9 | jobs: 10 | update-gradle-wrapper: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: Update Gradle Wrapper 15 | uses: gradle-update/update-gradle-wrapper-action@v2 16 | with: 17 | repo-token: ${{ secrets.GITHUB_TOKEN }} 18 | - uses: gradle/wrapper-validation-action@v3 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | build/ 3 | .idea 4 | *.iml 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gradle-Docker-Plugin example 2 | 3 | [![Gradle logo](https://github.com/gesellix/gradle-docker-plugin-example/raw/main/img/gradle-logo.png)](https://gradle.org/) 4 | [![Docker logo](https://github.com/gesellix/gradle-docker-plugin-example/raw/main/img/docker-logo.png)](https://www.docker.com/) 5 | 6 | Example project showing some use cases of the [gradle-docker-plugin](https://github.com/gesellix/gradle-docker-plugin). 7 | 8 | See the [build.gradle.kts](https://github.com/gesellix/gradle-docker-plugin-example/blob/main/build.gradle.kts) file in the 9 | project root for detailed task configuration. Most configuration parameters are optional. 10 | 11 | The root project only contains the most trivial tasks `info` and `version`. More advanced use cases can be found in the subprojects: 12 | 13 | * **build-with-dockerignore** shows how to use the [`.dockerignore` file](https://docs.docker.com/reference/builder/#the-dockerignore-file) to exclude the Gradle build directory or other files. 14 | * **build-and-run-locally** shows a simple use case with an image being build and run as a container locally. 15 | * **build-push-and-run-remotely** shows a more advanced use case including a private registry. 16 | * **push-and-pull-with-auth** shows how to use the default `~/.dockercfg` for registry authentication. 17 | * **run-exec-and-copy-locally** shows how to exec commands in a running container and how to copy files from a container. 18 | -------------------------------------------------------------------------------- /build-and-run-locally/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | import de.gesellix.gradle.docker.tasks.DockerRmTask 3 | import de.gesellix.gradle.docker.tasks.DockerRmiTask 4 | import de.gesellix.gradle.docker.tasks.DockerRunTask 5 | import de.gesellix.gradle.docker.tasks.DockerStopTask 6 | 7 | tasks { 8 | val rmImage = register("rmImage") { 9 | imageId.set("foo") 10 | } 11 | 12 | val buildImage = register("buildImage") { 13 | dependsOn(rmImage) 14 | imageName.set("foo") 15 | buildContextDirectory.set(file("./docker/")) 16 | } 17 | 18 | val stopContainer = register("stopContainer") { 19 | dependsOn(buildImage) 20 | containerId.set("foo") 21 | } 22 | 23 | val rmContainer = register("rmContainer") { 24 | dependsOn(stopContainer) 25 | containerId.set("foo") 26 | } 27 | 28 | register("runContainer") { 29 | dependsOn(rmContainer) 30 | imageName.set("foo") 31 | containerName.set("foo") 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /build-and-run-locally/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen 3 | 4 | RUN mkdir -p /opt/example 5 | ADD ./example.txt /opt/example/ 6 | ADD ./subdirectory /opt/example/subdirectory/ 7 | 8 | CMD ["cat", "/opt/example/subdirectory/gattaca.txt"] 9 | -------------------------------------------------------------------------------- /build-and-run-locally/docker/example.txt: -------------------------------------------------------------------------------- 1 | I'm in the root of the buildContext 2 | -------------------------------------------------------------------------------- /build-and-run-locally/docker/subdirectory/gattaca.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/build-and-run-locally/docker/subdirectory/gattaca.jpg -------------------------------------------------------------------------------- /build-and-run-locally/docker/subdirectory/gattaca.txt: -------------------------------------------------------------------------------- 1 | I'm sorry, the wind caught it. 2 | -------------------------------------------------------------------------------- /build-push-and-run-remotely/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.docker.remote.api.HostConfig 2 | import de.gesellix.docker.remote.api.PortBinding 3 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 4 | import de.gesellix.gradle.docker.tasks.DockerPsTask 5 | import de.gesellix.gradle.docker.tasks.DockerPullTask 6 | import de.gesellix.gradle.docker.tasks.DockerPushTask 7 | import de.gesellix.gradle.docker.tasks.DockerRmTask 8 | import de.gesellix.gradle.docker.tasks.DockerRunTask 9 | import de.gesellix.gradle.docker.tasks.DockerStopTask 10 | import groovy.json.JsonOutput.prettyPrint 11 | import groovy.json.JsonOutput.toJson 12 | 13 | val remoteDockerHost = "https://192.168.99.100:2376" 14 | 15 | tasks { 16 | val buildImage = register("buildImage") { 17 | imageName.set("gesellix/example") 18 | buildContextDirectory.set(file("./docker/")) 19 | } 20 | 21 | val pushImage = register("pushImage") { 22 | dependsOn(buildImage) 23 | repositoryName.set("gesellix/example") 24 | registry.set("localhost:5000") 25 | } 26 | 27 | val pullImageOnRemoteServer = register("pullImageOnRemoteServer") { 28 | dependsOn(pushImage) 29 | 30 | dockerHost.set(remoteDockerHost) 31 | imageName.set("gesellix/example") 32 | registry.set("localhost:5000") 33 | } 34 | 35 | val stopContainerOnRemoteServer = register("stopContainerOnRemoteServer") { 36 | dependsOn(pullImageOnRemoteServer) 37 | 38 | dockerHost.set(remoteDockerHost) 39 | containerId.set("a_unique_name") 40 | } 41 | 42 | val rmOldContainerOnRemoteServer = register("rmOldContainerOnRemoteServer") { 43 | dependsOn(stopContainerOnRemoteServer) 44 | 45 | dockerHost.set(remoteDockerHost) 46 | containerId.set("a_unique_name") 47 | } 48 | 49 | val runContainerOnRemoteServer = register("runContainerOnRemoteServer") { 50 | dependsOn(rmOldContainerOnRemoteServer) 51 | 52 | dockerHost.set(remoteDockerHost) 53 | imageName.set("localhost:5000/gesellix/example") 54 | containerName.set("a_unique_name") 55 | containerConfiguration.get().exposedPorts = mutableMapOf( 56 | "8889/tcp" to mapOf(), 57 | "9300/tcp" to mapOf() 58 | ) 59 | containerConfiguration.get().hostConfig = HostConfig().apply { 60 | portBindings = mutableMapOf( 61 | "8889/tcp" to mutableListOf( 62 | PortBinding().apply { 63 | hostPort = "8889" 64 | } 65 | ) 66 | ) 67 | } 68 | } 69 | 70 | register("listContainersOnRemoteServer") { 71 | dependsOn(runContainerOnRemoteServer) 72 | dockerHost.set(remoteDockerHost) 73 | 74 | doLast { 75 | println(prettyPrint(toJson(containers))) 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /build-push-and-run-remotely/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen 3 | 4 | RUN mkdir -p /opt/example 5 | ADD ./example.txt /opt/example/ 6 | ADD ./subdirectory /opt/example/subdirectory/ 7 | 8 | CMD ["cat", "/opt/example/subdirectory/gattaca.txt"] 9 | -------------------------------------------------------------------------------- /build-push-and-run-remotely/docker/example.txt: -------------------------------------------------------------------------------- 1 | I'm in the root of the buildContext 2 | -------------------------------------------------------------------------------- /build-push-and-run-remotely/docker/subdirectory/gattaca.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/build-push-and-run-remotely/docker/subdirectory/gattaca.jpg -------------------------------------------------------------------------------- /build-push-and-run-remotely/docker/subdirectory/gattaca.txt: -------------------------------------------------------------------------------- 1 | I'm sorry, the wind caught it. 2 | -------------------------------------------------------------------------------- /build-with-auth/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gesellix/private-repo 2 | CMD [ "echo", "hello world" ] 3 | -------------------------------------------------------------------------------- /build-with-auth/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | 3 | tasks { 4 | register("buildWithAuth") { 5 | imageName.set("gesellix/example") 6 | buildContextDirectory.set(file(".")) 7 | 8 | // Forced pull to test authentication at the remote registry. 9 | // Registry credentials should be found in the default config. 10 | buildParams.set(mutableMapOf("pull" to true)) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /build-with-buildargs/.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /build-with-buildargs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen 3 | 4 | ARG an_argument=default-value 5 | 6 | RUN echo ${an_argument} > /test.txt 7 | 8 | CMD ["cat", "/test.txt"] 9 | -------------------------------------------------------------------------------- /build-with-buildargs/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | 3 | tasks.register("buildImage") { 4 | imageName.set("buildarg-example") 5 | buildContextDirectory.set(file(".")) 6 | buildParams.putAll( 7 | mapOf( 8 | "rm" to true, 9 | "buildargs" to mapOf("an_argument" to "the value") 10 | ) 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /build-with-dockerignore/.dockerignore: -------------------------------------------------------------------------------- 1 | build 2 | ignoreddirectory 3 | file-to-be-ignored 4 | */another-file-to-be-ignored 5 | *.iml 6 | build.gradle 7 | -------------------------------------------------------------------------------- /build-with-dockerignore/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen 3 | 4 | WORKDIR /build-context 5 | ADD . /build-context 6 | 7 | RUN ./ensure-dockerignore.sh 8 | 9 | CMD ["ls", "-lisah", "/build-context"] 10 | -------------------------------------------------------------------------------- /build-with-dockerignore/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | 3 | tasks.register("buildImage") { 4 | imageName.set("foo") 5 | buildContextDirectory.set(file(".")) 6 | } 7 | -------------------------------------------------------------------------------- /build-with-dockerignore/ensure-dockerignore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [ ! -e "./file-to-be-ignored" \ 4 | -a ! -e "./subdirectory/another-file-to-be-ignored" \ 5 | -a ! -d "./build" \ 6 | -a ! -d "./ignoreddirectory" ] || exit 1 7 | -------------------------------------------------------------------------------- /build-with-dockerignore/file-to-be-ignored: -------------------------------------------------------------------------------- 1 | this one might be filled with lots of content 2 | -------------------------------------------------------------------------------- /build-with-dockerignore/ignoreddirectory/inside-an-ignored-directory: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/build-with-dockerignore/ignoreddirectory/inside-an-ignored-directory -------------------------------------------------------------------------------- /build-with-dockerignore/subdirectory/a-file-to-keep-in-the-build-context: -------------------------------------------------------------------------------- 1 | the wind caught it -------------------------------------------------------------------------------- /build-with-dockerignore/subdirectory/another-file-to-be-ignored: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/build-with-dockerignore/subdirectory/another-file-to-be-ignored -------------------------------------------------------------------------------- /build-with-tag/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | 3 | tasks { 4 | register("buildImage") { 5 | imageName.set("example:with-a-tag") 6 | buildContextDirectory.set(file("./docker/")) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /build-with-tag/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen 3 | 4 | RUN mkdir -p /opt/example 5 | ADD ./example.txt /opt/example/ 6 | ADD ./subdirectory /opt/example/subdirectory/ 7 | 8 | CMD ["cat", "/opt/example/subdirectory/gattaca.txt"] 9 | -------------------------------------------------------------------------------- /build-with-tag/docker/example.txt: -------------------------------------------------------------------------------- 1 | I'm in the root of the buildContext 2 | -------------------------------------------------------------------------------- /build-with-tag/docker/subdirectory/gattaca.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/build-with-tag/docker/subdirectory/gattaca.jpg -------------------------------------------------------------------------------- /build-with-tag/docker/subdirectory/gattaca.txt: -------------------------------------------------------------------------------- 1 | I'm sorry, the wind caught it. 2 | -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.docker.authentication.AuthConfig 2 | import de.gesellix.gradle.docker.tasks.DockerInfoTask 3 | import de.gesellix.gradle.docker.tasks.DockerPingTask 4 | import de.gesellix.gradle.docker.tasks.DockerVersionTask 5 | 6 | buildscript { 7 | repositories { 8 | mavenCentral() 9 | gradlePluginPortal() 10 | } 11 | 12 | dependencies { 13 | classpath("de.gesellix:docker-client:2025-05-17T19-00-00") 14 | classpath(localGroovy()) 15 | } 16 | } 17 | 18 | // Works with Gradle 2.1+. 19 | // For the old configuration see https://plugins.gradle.org/plugin/de.gesellix.docker 20 | // or use the pluginManagement in the settings.gradle.kts 21 | // to configure another repository. 22 | plugins { 23 | id("com.github.ben-manes.versions") version "0.52.0" 24 | id("net.ossindex.audit") version "0.4.11" 25 | id("de.gesellix.docker") version "2025-05-17T21-05-00" 26 | } 27 | 28 | allprojects { 29 | apply(plugin = "base") 30 | apply(plugin = "de.gesellix.docker") 31 | 32 | // configurations.all { 33 | // resolutionStrategy { 34 | // failOnVersionConflict() 35 | // dependencySubstitution { 36 | // all { 37 | // requested.let { 38 | // if (it is ModuleComponentSelector && it.group == "org.codehaus.groovy") { 39 | // logger.lifecycle("substituting $it with 'org.apache.groovy:*:4.0.15'") 40 | // useTarget( 41 | // "org.apache.groovy:${it.module}:4.0.15", 42 | // "Changed Maven coordinates since Groovy 4" 43 | // ) 44 | // } 45 | // } 46 | // } 47 | // } 48 | // } 49 | // } 50 | // configure { 51 | docker { 52 | // dockerHost = System.env.DOCKER_HOST ?: "unix:///var/run/docker.sock" 53 | // dockerHost = System.env.DOCKER_HOST ?: "https://192.168.99.100:2376" 54 | // certPath = System.getProperty("docker.cert.path") ?: "${System.getProperty("user.home")}/.docker/machine/machines/default" 55 | authConfig = AuthConfig().apply { 56 | username = "gesellix" 57 | password = "-yet-another-password-" 58 | email = "tobias@gesellix.de" 59 | serveraddress = "https://index.docker.io/v1/" 60 | } 61 | } 62 | } 63 | 64 | tasks { 65 | register("ping") { 66 | doLast { 67 | println(result.content) 68 | } 69 | } 70 | 71 | register("dockerVersion") { 72 | doLast { 73 | println(version.content) 74 | } 75 | } 76 | 77 | register("dockerInfo") { 78 | doLast { 79 | println(info.content) 80 | } 81 | } 82 | 83 | wrapper { 84 | gradleVersion = "8.14" 85 | distributionType = Wrapper.DistributionType.BIN 86 | // https://gradle.org/release-checksums/ 87 | distributionSha256Sum = "61ad310d3c7d3e5da131b76bbf22b5a4c0786e9d892dae8c1658d4b484de3caa" 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.daemon=true 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionSha256Sum=61ad310d3c7d3e5da131b76bbf22b5a4c0786e9d892dae8c1658d4b484de3caa 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | # SPDX-License-Identifier: Apache-2.0 19 | # 20 | 21 | ############################################################################## 22 | # 23 | # Gradle start up script for POSIX generated by Gradle. 24 | # 25 | # Important for running: 26 | # 27 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 28 | # noncompliant, but you have some other compliant shell such as ksh or 29 | # bash, then to run this script, type that shell name before the whole 30 | # command line, like: 31 | # 32 | # ksh Gradle 33 | # 34 | # Busybox and similar reduced shells will NOT work, because this script 35 | # requires all of these POSIX shell features: 36 | # * functions; 37 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 38 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 39 | # * compound commands having a testable exit status, especially «case»; 40 | # * various built-in commands including «command», «set», and «ulimit». 41 | # 42 | # Important for patching: 43 | # 44 | # (2) This script targets any POSIX shell, so it avoids extensions provided 45 | # by Bash, Ksh, etc; in particular arrays are avoided. 46 | # 47 | # The "traditional" practice of packing multiple parameters into a 48 | # space-separated string is a well documented source of bugs and security 49 | # problems, so this is (mostly) avoided, by progressively accumulating 50 | # options in "$@", and eventually passing that to Java. 51 | # 52 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 53 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 54 | # see the in-line comments for details. 55 | # 56 | # There are tweaks for specific operating systems such as AIX, CygWin, 57 | # Darwin, MinGW, and NonStop. 58 | # 59 | # (3) This script is generated from the Groovy template 60 | # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 61 | # within the Gradle project. 62 | # 63 | # You can find Gradle at https://github.com/gradle/gradle/. 64 | # 65 | ############################################################################## 66 | 67 | # Attempt to set APP_HOME 68 | 69 | # Resolve links: $0 may be a link 70 | app_path=$0 71 | 72 | # Need this for daisy-chained symlinks. 73 | while 74 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 75 | [ -h "$app_path" ] 76 | do 77 | ls=$( ls -ld "$app_path" ) 78 | link=${ls#*' -> '} 79 | case $link in #( 80 | /*) app_path=$link ;; #( 81 | *) app_path=$APP_HOME$link ;; 82 | esac 83 | done 84 | 85 | # This is normally unused 86 | # shellcheck disable=SC2034 87 | APP_BASE_NAME=${0##*/} 88 | # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) 89 | APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH="\\\"\\\"" 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | if ! command -v java >/dev/null 2>&1 137 | then 138 | die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 139 | 140 | Please set the JAVA_HOME variable in your environment to match the 141 | location of your Java installation." 142 | fi 143 | fi 144 | 145 | # Increase the maximum file descriptors if we can. 146 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 147 | case $MAX_FD in #( 148 | max*) 149 | # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. 150 | # shellcheck disable=SC2039,SC3045 151 | MAX_FD=$( ulimit -H -n ) || 152 | warn "Could not query maximum file descriptor limit" 153 | esac 154 | case $MAX_FD in #( 155 | '' | soft) :;; #( 156 | *) 157 | # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. 158 | # shellcheck disable=SC2039,SC3045 159 | ulimit -n "$MAX_FD" || 160 | warn "Could not set maximum file descriptor limit to $MAX_FD" 161 | esac 162 | fi 163 | 164 | # Collect all arguments for the java command, stacking in reverse order: 165 | # * args from the command line 166 | # * the main class name 167 | # * -classpath 168 | # * -D...appname settings 169 | # * --module-path (only if needed) 170 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 171 | 172 | # For Cygwin or MSYS, switch paths to Windows format before running java 173 | if "$cygwin" || "$msys" ; then 174 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 175 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 176 | 177 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 178 | 179 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 180 | for arg do 181 | if 182 | case $arg in #( 183 | -*) false ;; # don't mess with options #( 184 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 185 | [ -e "$t" ] ;; #( 186 | *) false ;; 187 | esac 188 | then 189 | arg=$( cygpath --path --ignore --mixed "$arg" ) 190 | fi 191 | # Roll the args list around exactly as many times as the number of 192 | # args, so each arg winds up back in the position where it started, but 193 | # possibly modified. 194 | # 195 | # NB: a `for` loop captures its iteration list before it begins, so 196 | # changing the positional parameters here affects neither the number of 197 | # iterations, nor the values presented in `arg`. 198 | shift # remove old arg 199 | set -- "$@" "$arg" # push replacement arg 200 | done 201 | fi 202 | 203 | 204 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 205 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 206 | 207 | # Collect all arguments for the java command: 208 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, 209 | # and any embedded shellness will be escaped. 210 | # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be 211 | # treated as '${Hostname}' itself on the command line. 212 | 213 | set -- \ 214 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 215 | -classpath "$CLASSPATH" \ 216 | -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ 217 | "$@" 218 | 219 | # Stop when "xargs" is not available. 220 | if ! command -v xargs >/dev/null 2>&1 221 | then 222 | die "xargs is not available" 223 | fi 224 | 225 | # Use "xargs" to parse quoted args. 226 | # 227 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 228 | # 229 | # In Bash we could simply go: 230 | # 231 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 232 | # set -- "${ARGS[@]}" "$@" 233 | # 234 | # but POSIX shell has neither arrays nor command substitution, so instead we 235 | # post-process each arg (as a line of input to sed) to backslash-escape any 236 | # character that might be a shell metacharacter, then use eval to reverse 237 | # that process (while maintaining the separation between arguments), and wrap 238 | # the whole thing up as a single "set" statement. 239 | # 240 | # This will of course break if any of these variables contains a newline or 241 | # an unmatched quote. 242 | # 243 | 244 | eval "set -- $( 245 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 246 | xargs -n1 | 247 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 248 | tr '\n' ' ' 249 | )" '"$@"' 250 | 251 | exec "$JAVACMD" "$@" 252 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH= 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /img/docker-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/img/docker-logo.png -------------------------------------------------------------------------------- /img/gradle-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gesellix/gradle-docker-plugin-example/7f7369492e2c5a8ea28e135f75eb079f34516d1b/img/gradle-logo.png -------------------------------------------------------------------------------- /issue-41/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.GenericDockerTask 2 | 3 | docker { 4 | dockerHost = System.getProperty("DOCKER_HOST") ?: "https://192.168.99.100:2376" 5 | certPath = System.getProperty("docker.cert.path") ?: "${System.getProperty("user.home")}/.docker/machine/machines/default" 6 | } 7 | 8 | tasks.register("verifyDockerVersion") { 9 | doFirst { 10 | logger.lifecycle(certPath.get()) 11 | val regexOld = """^1\.10\.""".toRegex() 12 | val regexNew = """^\d{2,}\.\d+\..*""".toRegex() 13 | val version = dockerClient.version().content.version ?: "" 14 | if (!(regexOld matches version || regexNew matches version)) { 15 | throw GradleException("Requires Docker 1.10+, got ${version}.") 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /issue-64/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.docker.client.DockerClientImpl 2 | import de.gesellix.gradle.docker.tasks.GenericDockerTask 3 | 4 | buildscript { 5 | repositories { 6 | mavenLocal() 7 | maven { 8 | setUrl("https://plugins.gradle.org/m2/") 9 | } 10 | } 11 | dependencies { 12 | // classpath "de.gesellix:gradle-docker-plugin:2017-10-05T20-48-17" 13 | // classpath "de.gesellix:gradle-docker-plugin:2017-12-28T22-48-35" 14 | // classpath "de.gesellix:gradle-docker-plugin:1.0.0-SNAPSHOT" 15 | } 16 | } 17 | 18 | //apply(plugin=de.gesellix.gradle.docker.DockerPlugin) 19 | 20 | //docker { 21 | // dockerHost "http://10.30.0.129:2375" 22 | //} 23 | tasks.register("info") { 24 | dockerHost.set("http://10.30.0.129:2375") 25 | doLast { 26 | val client = dockerClient as DockerClientImpl 27 | // println((client.httpClient as OkDockerClient).dockerClientConfig.env.dockerHost) // unix:///var/run/docker.sock 28 | println(client.dockerClientConfig.env.dockerHost) // unix:///var/run/docker.sock 29 | println(client.env.dockerHost) // http://10.30.0.129:2375 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /push-and-pull-with-auth/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerPullTask 2 | import de.gesellix.gradle.docker.tasks.DockerPushTask 3 | 4 | // fallback to index.docker.io 5 | val registryHostname = null 6 | // fallback to ~/.dockercfg 7 | val dockerCfgFilename = null 8 | 9 | tasks { 10 | register("pushImageToPrivateRepo") { 11 | repositoryName.set("gesellix/private-repo") 12 | authConfig.set(dockerClient.readAuthConfig(registryHostname, dockerCfgFilename)) 13 | } 14 | register("pullImageFromRemoteServer") { 15 | imageName.set("gesellix/private-repo") 16 | imageTag.set("latest") 17 | authConfig.set(dockerClient.readDefaultAuthConfig()) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /run-exec-and-copy-locally/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.docker.client.container.ArchiveUtil 2 | import de.gesellix.gradle.docker.tasks.DockerCopyFromContainerTask 3 | import de.gesellix.gradle.docker.tasks.DockerExecTask 4 | import de.gesellix.gradle.docker.tasks.DockerRmTask 5 | import de.gesellix.gradle.docker.tasks.DockerRunTask 6 | import de.gesellix.gradle.docker.tasks.DockerStopTask 7 | import de.gesellix.gradle.docker.tasks.GenericDockerTask 8 | import java.io.FileOutputStream 9 | import java.io.InputStream 10 | 11 | tasks { 12 | val stopContainer = register("stopContainer") { 13 | containerId.set("exec-example") 14 | } 15 | val rmContainer = register("rmContainer") { 16 | dependsOn(stopContainer) 17 | containerId.set("exec-example") 18 | } 19 | val runContainer = register("runContainer") { 20 | dependsOn(rmContainer) 21 | imageName.set("alpine:edge") 22 | containerName.set("exec-example") 23 | containerConfiguration.get().cmd = mutableListOf("ping", "127.0.0.1") 24 | } 25 | val execInContainer = register("execInContainer") { 26 | dependsOn(runContainer) 27 | 28 | containerId.set("exec-example") 29 | cmd.set("echo \"hallo\" > /test.txt && cat /test.txt") 30 | 31 | // doLast { 32 | // logger.info("${IOUtils.copy(result.stream, System.out)}") 33 | // } 34 | } 35 | val stopContainerAfterExec = register("stopContainerAfterExec") { 36 | containerId.set("exec-example") 37 | } 38 | val downloadArchiveFromContainer = register("downloadArchiveFromContainer") { 39 | dependsOn(execInContainer) 40 | finalizedBy(stopContainerAfterExec) 41 | container.set("exec-example") 42 | sourcePath.set("/test.txt") 43 | } 44 | register("extractSingleFile") { 45 | dependsOn(downloadArchiveFromContainer) 46 | 47 | doLast { 48 | val fileContent = ArchiveUtil().extractSingleTarEntry(downloadArchiveFromContainer.get().content.stream as InputStream, "test.txt") 49 | buildDir.mkdirs() 50 | val outputStream = FileOutputStream("$buildDir/test.txt") 51 | fileContent.inputStream().copyTo(outputStream) 52 | outputStream.close() 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /run-with-data-volume/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.docker.remote.api.HostConfig 2 | import de.gesellix.gradle.docker.tasks.DockerCreateTask 3 | import de.gesellix.gradle.docker.tasks.DockerInspectContainerTask 4 | import de.gesellix.gradle.docker.tasks.DockerRmTask 5 | import de.gesellix.gradle.docker.tasks.DockerRunTask 6 | import de.gesellix.gradle.docker.tasks.DockerStopTask 7 | 8 | val volumeDir = "/tmp" 9 | 10 | tasks { 11 | 12 | val createDataContainer = register("createDataContainer") { 13 | imageName.set("gesellix/docker-client-testimage") 14 | containerName.set("data-volume") 15 | containerConfiguration.get().apply { 16 | cmd = mutableListOf("-") 17 | image = "gesellix/run-with-data-volumes" 18 | hostConfig = HostConfig().apply { 19 | binds = mutableListOf("$volumeDir:/data") 20 | } 21 | } 22 | } 23 | val runContainerWithDataVolume = register("runContainerWithDataVolume") { 24 | dependsOn(createDataContainer) 25 | imageName.set("gesellix/docker-client-testimage") 26 | containerName.set("service-example") 27 | containerConfiguration.get().apply { 28 | cmd = mutableListOf("true") 29 | hostConfig = HostConfig().apply { 30 | volumesFrom = mutableListOf("data-volume") 31 | } 32 | } 33 | } 34 | 35 | val inspectServiceContainer = register("inspectServiceContainer") { 36 | dependsOn(runContainerWithDataVolume) 37 | containerId.set("service-example") 38 | 39 | doLast { 40 | logger.info("${containerInfo.content}") 41 | } 42 | } 43 | 44 | val stopServiceContainer = register("stopServiceContainer") { 45 | dependsOn(inspectServiceContainer) 46 | containerId.set("service-example") 47 | } 48 | 49 | val rmServiceContainer = register("rmServiceContainer") { 50 | dependsOn(stopServiceContainer) 51 | containerId.set("service-example") 52 | } 53 | 54 | val rmDataVolumeContainer = register("rmDataVolumeContainer") { 55 | dependsOn(rmServiceContainer) 56 | containerId.set("service-example") 57 | } 58 | 59 | runContainerWithDataVolume.get().finalizedBy(rmDataVolumeContainer) 60 | } 61 | -------------------------------------------------------------------------------- /run-with-user/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import de.gesellix.gradle.docker.tasks.DockerBuildTask 2 | import de.gesellix.gradle.docker.tasks.DockerLogsTask 3 | import de.gesellix.gradle.docker.tasks.DockerRmTask 4 | import de.gesellix.gradle.docker.tasks.DockerRmiTask 5 | import de.gesellix.gradle.docker.tasks.DockerRunTask 6 | import de.gesellix.gradle.docker.tasks.DockerStopTask 7 | 8 | tasks { 9 | val stopContainer1 = register("stopContainer1") { 10 | containerId.set("run-with-user") 11 | } 12 | val rmContainer1 = register("rmContainer1") { 13 | dependsOn(stopContainer1) 14 | containerId.set("run-with-user") 15 | } 16 | val stopContainer2 = register("stopContainer2") { 17 | containerId.set("run-with-user-example") 18 | } 19 | val rmContainer2 = register("rmContainer2") { 20 | dependsOn(stopContainer2) 21 | containerId.set("run-with-user-example") 22 | } 23 | val rmImage = register("rmImage") { 24 | dependsOn(rmContainer1, rmContainer2) 25 | imageId.set("run-with-user") 26 | } 27 | val buildImage = register("buildImage") { 28 | dependsOn(rmImage) 29 | imageName.set("run-with-user") 30 | buildContextDirectory.set(file("./docker/")) 31 | } 32 | val runContainer = register("runContainer") { 33 | dependsOn(buildImage, rmContainer1, rmContainer2) 34 | imageName.set("run-with-user") 35 | containerName.set("run-with-user-example") 36 | containerConfiguration.get().apply { 37 | tty = true 38 | user = "root" 39 | } 40 | } 41 | register("printContainerLogs") { 42 | dependsOn(runContainer) 43 | containerId.set("run-with-user-example") 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /run-with-user/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:edge 2 | MAINTAINER Tobias Gesellchen (@gesellix) 3 | RUN adduser -S myuser 4 | USER myuser 5 | CMD ["id"] 6 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | include( 2 | "build-and-run-locally", 3 | "build-with-auth", 4 | "build-with-buildargs", 5 | "build-with-dockerignore", 6 | "build-with-tag", 7 | "run-exec-and-copy-locally", 8 | "run-with-data-volume", 9 | "push-and-pull-with-auth", 10 | "build-push-and-run-remotely", 11 | "issue-41", 12 | "issue-64", 13 | "run-with-user", 14 | ) 15 | 16 | //pluginManagement { 17 | // repositories { 18 | // maven { 19 | // url = uri("file:///home/gesellix/dev/github/gesellix/gradle-docker-plugin/local-plugins") 20 | // } 21 | // mavenLocal() 22 | // mavenCentral() 23 | // gradlePluginPortal() 24 | // } 25 | //} 26 | --------------------------------------------------------------------------------