Releases: steklopod/gradle-docker-plugin
1.1.0 is here
Available tasks for docker
plugin:
deploy
- compose up project fromdocker-compose.yml
file (default with recreate & rebuild)deployDev
- compose up docker container fromdocker-compose.dev.yml
filerecompose
,recomposeDev
- compose up after removing current docker-servicestop
,remove
- stop/remove docker containerlogs
,docker
- print current docker-services
deploy is easy
Gradle docker
plugin
π‘οΈ docker
- gradle plugin for projects with any types and languages.
It gives helpful gradle's tasks for working with docker containers.
Quick start
-
You only need to have
docker-compose.yml
file in root of project -
In your
build.gradle.kts
file:
plugins {
id("online.colaba.docker") version "0.2.2"
}
Run π―
./gradlew deploy
this task is equivalent to
docker-compose up --build --force-recreate -d
command.
Available gradle's tasks for docker
plugin:
Name of service for all tasks equals to ${project.name}. You can customize options of each task.
containers
- print current docker-services;deploy
- compose up docker-service;stop
- stops docker-container;remove
- removes docker-service;redeploy
- compose up after removing current docker-service.
Example π«
- Structure
hello
| - build.gradle.kts
| - docker-compose.yml
| - docker-compose.dev.yml (optional)
docker-compose.yml
file
version: "3.7"
services:
hello:
image: hello-world
container_name: hello
Optional
docker-compose.dev.yml
,Dockerfile
&Dockerfile.dev
files are optionals.
Optional tasks:
deployDev
- compose up docker-service fromdocker-compose.dev.yml
file;redeployDev
- compose up after removing current docker-service fromdocker-compose.dev.yml
file.
0.1.1
Init version
Gradle docker-plugin
π‘οΈ Gradle docker plugin
for projects with types and languages
Quickstart
You only need to have docker-compose.yml
file in root of project
In your
buildgradle.kt
file:
plugins {
id("online.colaba.docker") version "0.1"
}
Available docker-tasks for docker
-plugin:
Name of service for all tasks equalse to ${project.name}
gradle stop
- stops docker-container
gradle containers
- print current docker-services
gradle remove
- removes docker-service
gradle deploy
- compose up docker-service from docker-compose.yml
file
gradle deployDev
- compose up docker-service from docker-compose.dev.yml
file [optional]
gradle redeploy
- compose up after removing current docker-service
gradle redeployDev
-- compose up after removing current docker-service from docker-compose.dev.yml
file [optional]
Apply only for subprojects
subprojects {
apply<Docker>()
registerExecutorTask()
}
docker-compose.yml
&Dockerfile
files are optionals.