You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integration/examples/jib-sync/README.md
+14-25
Original file line number
Diff line number
Diff line change
@@ -63,41 +63,30 @@ build:
63
63
64
64
This example is designed around the functionality available in [Spring Boot Developer Tools](https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools) for developing against running applications.
65
65
66
-
Some additional steps in your java build are required for this to work:
67
-
- Sync requires `tar` on the running container to copy files over. The default base image that Jib uses `gcr.io/distroless/java` does not include `tar` or any utilities. During development you must use a base image that includes `tar`, in this example we use the `debug` flavor of distroless: `gcr.io/distroless/java:debug`
66
+
Some additional steps are required for this to work:
67
+
- Sync requires `tar` on the running container to copy files over. The default base image that Jib uses `gcr.io/distroless/java` does not include `tar` or any utilities. During development, you must use a base image that includes `tar`, in this example we use the `debug` flavor of distroless: `gcr.io/distroless/java:debug`
68
68
69
-
`maven`
70
-
```xml
71
-
<plugin>
72
-
<groupId>com.google.cloud.tools</groupId>
73
-
<artifactId>jib-maven-plugin</artifactId>
74
-
<version>${jib.maven-plugin-version}</version>
75
-
<configuration>
76
-
...
77
-
<from>
78
-
<image>gcr.io/distroless/java:debug</image>
79
-
</from>
80
-
</configuration>
81
-
</plugin>
82
-
```
69
+
This can be done directly in the artifact configuration by overriding the `fromImage` property.
83
70
84
-
`gradle`
85
-
```groovy
86
-
jib {
87
-
...
88
-
from {
89
-
image = "gcr.io/distroless/java:debug"
90
-
}
91
-
}
71
+
```yaml
72
+
build:
73
+
artifacts:
74
+
- image: skaffold-example
75
+
context: .
76
+
jib:
77
+
fromImage: gcr.io/distroless/java:debug
78
+
sync:
79
+
auto: {}
92
80
```
93
81
82
+
94
83
- You must include the `spring-boot-devtools` dependency at the `compile/implementation` scope, which is contrary to the configuration outlined in the [official docs](https://docs.spring.io/spring-boot/docs/current/reference/html/using-spring-boot.html#using-boot-devtools). Because jib is unaware of any special spring only configuration in your builds, we recommend using profiles to turn on or off devtools support in your jib container builds.
0 commit comments