-
Notifications
You must be signed in to change notification settings - Fork 40.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
107 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...g-boot-gradle-plugin/src/docs/gradle/packaging/boot-build-image-docker-host-colima.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
plugins { | ||
id 'java' | ||
id 'org.springframework.boot' version '{gradle-project-version}' | ||
} | ||
|
||
tasks.named("bootJar") { | ||
mainClass = 'com.example.ExampleApplication' | ||
} | ||
|
||
// tag::docker-host[] | ||
tasks.named("bootBuildImage") { | ||
docker { | ||
host = "unix://${System.properties['user.home']}/.colima/docker.sock" | ||
} | ||
} | ||
// end::docker-host[] | ||
|
||
tasks.register("bootBuildImageDocker") { | ||
doFirst { | ||
println("host=${tasks.bootBuildImage.docker.host}") | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...ot-gradle-plugin/src/docs/gradle/packaging/boot-build-image-docker-host-colima.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import org.springframework.boot.gradle.tasks.bundling.BootJar | ||
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage | ||
|
||
plugins { | ||
java | ||
id("org.springframework.boot") version "{gradle-project-version}" | ||
} | ||
|
||
tasks.named<BootJar>("bootJar") { | ||
mainClass.set("com.example.ExampleApplication") | ||
} | ||
|
||
// tag::docker-host[] | ||
tasks.named<BootBuildImage>("bootBuildImage") { | ||
docker { | ||
host = "unix://${System.getProperty("user.home")}/.colima/docker.sock" | ||
} | ||
} | ||
// end::docker-host[] | ||
|
||
tasks.register("bootBuildImageDocker") { | ||
doFirst { | ||
println("host=${tasks.getByName<BootBuildImage>("bootBuildImage").docker.host}") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...t-tools/spring-boot-maven-plugin/src/docs/maven/packaging-oci-image/docker-colima-pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- tag::docker-colima[] --> | ||
<project> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<configuration> | ||
<docker> | ||
<host>unix:///${user.home}/.colima/docker.sock</host> | ||
</docker> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> | ||
<!-- end::docker-colima[] --> |