gradle-docker
gradle-docker copied to clipboard
Support git commit Id out of the box as image version
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.