$ mvn package jib:build
$ gradle jib
tomcat:8.5-jre8-alpine
gcr.io/my-project/my-war-image
/usr/local/tomcat/webapps/my-webapp
jib {
from.image = 'tomcat:8.5-jre8-alpine'
to.image = 'gcr.io/my-project/my-war-image'
container.appRoot = '/usr/local/tomcat/webapps/my-webapp'
}
skaffold.yaml:
apiVersion: skaffold/v1beta4
kind: Config
build:
artifacts:
- image: gcr.io/my-project/my-java-image
# Use this for a Maven project:
jibMaven: {}
# Use this for a Gradle project:
jibGradle: {}
$ skaffold dev --trigger notify
com.google.cloud.tools
jib-core
0.1.1
dependencies {
implementation 'com.google.cloud.tools:jib-core:0.1.1'
}
Jib.from("busybox")
.addLayer(Arrays.asList(Paths.get("helloworld.sh")), AbsoluteUnixPath.get("/"))
.setEntrypoint("sh", "/helloworld.sh")
.containerize(
Containerizer.to(RegistryImage.named("gcr.io/my-project/hello-from-jib")
.addCredential("myusername", "mypassword")));
com.google.cloud.tools
jib-maven-plugin
1.0.0
gcr.io/my-project/my-java-image
$ mvn compile jib:build
$ mvn compile jib:dockerBuild
$ mvn compile com.google.cloud.tools:jib-maven-plugin:1.0.0:build -Dimage=gcr.io/my-project/my-java-image
plugins {
id 'com.google.cloud.tools.jib' version '1.0.0'
}
jib.to.image = 'gcr.io/my-project/my-java-image'
$ gradle jib
$ gradle jibDockerBuild
-
https://cloudtoolsforjava.page.link/hfCY
-
https://cloudtoolsforjava.page.link/iDVw
-
https://cloudtoolsforjava.page.link/WepQ
-
https://cloudtoolsforjava.page.link/U1YB
-
https://gitter.im/google/jib
-
https://cloudtoolsforjava.page.link/K5uf
-
https://cloudtoolsforjava.page.link/vhUX
-
https://cloudtoolsforjava.page.link/vhUX
-
https://cloudtoolsforjava.page.link/Xwwv