You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否仅使用GoogleContainerTools/jib构建镜像,而非部署至云端或DockerHub?

Can Jib build images without pushing to a remote registry?

Absolutely! You can totally use Jib to build container images without pushing them to any remote registry (like Docker Hub or cloud-based registries). Here’s how to do it with the two most common build tools:

Maven

  • Build directly to your local Docker daemon
    If you have Docker running locally, use this command to build the image and load it straight into your Docker environment—no remote push involved:

    mvn jib:dockerBuild
    

    You can then run the image using standard Docker commands, just like any locally built image.

  • Export as a standalone tar file
    If you don’t want to rely on Docker, you can export the built image as a tar file (great for transferring or loading later):

    mvn jib:buildTar
    

    By default, the tar file will be created at target/jib-image.tar. To load it into Docker later, use:

    docker load -f target/jib-image.tar
    

Gradle

  • Build directly to your local Docker daemon
    Similar to Maven, run this command to build and load the image into your local Docker instance:

    ./gradlew jibDockerBuild
    
  • Export as a standalone tar file
    Generate a tar version of your image with:

    ./gradlew jibBuildTar
    

    The default output path is build/jib-image.tar, and you can load it into Docker using the same docker load command mentioned above.

All these workflows skip the remote push step entirely—you get your fully built image locally, ready to test, run, or distribute however you need. No external registry required!

内容的提问来源于stack exchange,提问作者IsaacLevon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 22:17:48