gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

Support git commit Id out of the box as image version

Open jacek99 opened this issue 5 years ago • 0 comments

Very common these days to automatically tag any generated Docker image with the git commit id.

Would be great if the Docker & Docker-Compose plugins supported this out of the box without any extra wrangling with Gradle, e.g.

docker {

# automatically tag the image with current git commit Id
 gitCommitIdVersion: true

}

docker-compose.yml.template:

image: mycompany.com/myapp:{{gitCommitId}}

as an alternative to the docker dependency mechanism used today...I see this pattern of all images in a multi-module Gradle project tagged with current commit Id quite often these days.

jacek99 avatar Mar 16 '20 15:03 jacek99