The normal docker build
command creates the image locally and does not do an automatic push to a registry. Is it possible to do the same with jib using the Gradle plugin?
Asked
Active
Viewed 2,205 times
2

Archimedes Trajano
- 35,625
- 19
- 175
- 265
1 Answers
6
gradle jibDockerBuild
builds and pushes to a local Docker Engine (daemon).
However, jibDockerBuild
followed by docker push
is very inefficient compared to building and pushing directly to a registry with gradle jib
due to the limited capability of the Docker Engine API. Likewise, if you are making small incremental changes during development and you have a large base image or dependencies, it's even possible that gradle jib
followed by docker pull
is much faster than gradle jibDockerBuild
. This is because gradle jib
can upload only those layers that changed (regardless of the order of layers).
FYI, gradle jibBuildTar
is another Jib task that creates a local image tarball (of either OCI or Docker format).

Chanseok Oh
- 3,920
- 4
- 23
- 63