jib VS buildkit

Compare jib vs buildkit and see what are their differences.

jib

๐Ÿ— Build container images for your Java applications. (by GoogleContainerTools)

buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit (by moby)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
jib buildkit
46 52
13,321 7,606
0.9% 2.1%
8.0 9.8
7 days ago about 12 hours ago
Java Go
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

jib

Posts with mentions or reviews of jib. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-15.
  • Nix is a better Docker image builder than Docker's image builder
    21 projects | news.ycombinator.com | 15 Mar 2024
    Having the author do this for a service written in Go is a mistake. Your first address for containerizing Go services should be ko: https://ko.build/ , and similar solutions like Jib in the Java ecosystem: https://github.com/GoogleContainerTools/jib . No need to require everyone to install something heavy like Nix, no need for privileged containers in CI to connect to a Docker daemon so that actual commands can be executed to determine filesystem contents, just the absolute bare minimum of a manifest defining a base layer + the compiled artifacts copied into the tarball at the correct positions. More languages should support this kind of model - when you see that pnpm's recipe (https://pnpm.io/docker), ultimately, is to pick a pre-existing node base image, then copy artifacts in and set some manifest settings, there's really no technical reason why something like "pnpm build-container-image", without a dependency on a Docker daemon, hasn't been implemented yet.

    Using nix, or Dockerfile, or similar systems are, today, fundamentally additional complications to support building containerized systems that are not pure Go or pure Java etc. So we should stop recommending them as the default.

    21 projects | news.ycombinator.com | 15 Mar 2024
  • Deploy Secure Spring Boot Microservices on Amazon EKS Using Terraform and Kubernetes
    13 projects | dev.to | 23 Nov 2023
    You need to build Docker images for each app. This is specific to the JHipster application used in this tutorial which uses Jib to build the images. Make sure you are logged into Docker using docker login. Navigate to each app folder (store, invoice, product) and run the following command:
  • Tool to build Docker images
    5 projects | /r/devops | 26 May 2023
    JIB
  • Thin (ish) Clojure jars for better docker containers
    3 projects | /r/Clojure | 23 May 2023
    It is pretty easy to do with https://github.com/GoogleContainerTools/jib.
  • Fearless Distroless
    3 projects | dev.to | 20 Apr 2023
    I first learned about Distroless because it was the default option in Google's Jib. Jib is a Maven plugin to create Docker containers without dependency on Docker. Note that the default has changed now.
  • Spring Boot pod takes 60 seconds to become ready; trouble handling spiky workloads
    2 projects | /r/devops | 6 Apr 2023
    Optimize your Dockerfile by using a small base Java Image, use either Spring Boot's layers tools or Google Jib to build your docker file, and increase CPU/Memory requests and limits if you can.
  • CI/CD with Spring Boot and Jenkins Pipelines
    6 projects | dev.to | 28 Mar 2023
    In this section, we will setup the automated generation and deployment of a Docker container image. You will need a Docker Hub account and the Jib Gradle Plugin.
  • How to Deploy JHipster Microservices on Amazon EKS Using Terraform and Kubernetes
    10 projects | dev.to | 5 Jul 2022
    You need to build Docker images for each app. This is specific to the JHipster application used in this tutorial which uses Jib to build the images. Make sure you are logged into Docker using docker login. Navigate to each app folder (store, invoice, product) and run the following command:
  • Cloud Native Java Microservices with JHipster and Istio
    18 projects | dev.to | 28 Jun 2022
    We are ready to deploy now. First, we need to build and push the images to the registry. We can use the handy Jib commands provided by JHipster. Navigate to each of the microservice folders and run the commands below.

buildkit

Posts with mentions or reviews of buildkit. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-03.
  • The worst thing about Jenkins is that it works
    12 projects | news.ycombinator.com | 3 Dec 2023
    > We are uding docker-in-docker at the moment

    You can also run a "less privileged" container with all the features of Docker by using rootless buildkit in Kubernetes. Here are some examples:

    https://github.com/moby/buildkit/tree/master/examples/kubern...

    https://github.com/moby/buildkit/blob/master/examples/kubern...

    It's also possible to run dedicated buildkitd workers and connect to them remotely.

  • macOS Containers v0.0.1
    24 projects | news.ycombinator.com | 26 Sep 2023
  • Jenkins Agents On Kubernetes
    7 projects | dev.to | 4 Sep 2023
    Now since Kubernetes works off of containerd I'll be taking a different approach on handling container builds by using nerdctl and the buildkit that comes bundled with it. I'll do this on the amd64 control plane node since it's beefier than my Raspberry Pi workers for handling builds and build related services. Go ahead and download and unpack the latest nerdctl release as of writing (make sure to check the release page in case there's a new one):
  • Cicada - CI/CD platform written with Rust
    2 projects | /r/rust | 25 Apr 2023
    Yeah, only Linux containers at the moment, BuildKit is the way we are constructing pipelines and doing caching. Split on if we will support non-linux hosts, but definitely want to find a good solution to not doing Docker-in-Docker.
  • Better support of Docker layer caching in Cargo
    2 projects | /r/rust | 30 Mar 2023
    Relevant issues are https://github.com/moby/buildkit/issues/3011 and https://github.com/moby/buildkit/issues/1512.
  • DockerHub replacement stratagy and options
    5 projects | /r/ipfs | 16 Mar 2023
    If you notice, the same thing I noticed in this list is that most of these are workarounds to support the web2 api on IPFS. There is a pull in draft for BuildKit that may make native IPFS image support better on the image build side. With the work on the nerdctl side being the most direct support for images for pushing and pulling images with IPFS hashes.
  • Why I joined Dagger
    3 projects | dev.to | 6 Feb 2023
    Last year I joined Dagger after realizing we were trying to solve all of the same problems (escaping YAML hell, unifying CI and dev workflows, minimizing CI overhead โ€“ more on all that later). We were even using the same underlying technology (Buildkit) and running into all of the same challenges.
  • Rails on Docker ยท Fly
    16 projects | news.ycombinator.com | 26 Jan 2023
    How would you do this in a generic, reusable way company-wide? Given that you don't know the targets beforehand, the names, or even the number of stages.

    It is of course possible to do for a single project with a bit of effort: build each stage with a remote OCI cache source, push the cash there after. But... that sucks.

    What you want is the `max` cache type in buildkit[1]. Except... not much supports that yet. The native S3 cache would also be good once it stabalizes.

    1. https://github.com/moby/buildkit#export-cache

    16 projects | news.ycombinator.com | 26 Jan 2023
    I know those questions are probably rhetorical, but to answer them anyway:

    > > Nice syntax

    > Is it though?

    The most common alternative is to use a backslash at the end of each line, to create a line continuation. This swallows the newline, so you also need a semicolon. Forgetting the semicolon leads to weird errors. Also, while Docker supports comments interspersed with line continuations, sh doesn't, so if such a command contains comments it can't be copied into sh.

    There heredoc syntax doesn't have any of these issues; I think it is infinitely better.

    (There is also JSON-style syntax, but it requires all backslashes to be doubled and is less popular.)

    *In practice "&&" is normally used rather than ";" in order to stop the build if any command fails (otherwise sh only propagates the exit status of the last command). This is actually a small footgun with the heredoc syntax, because it is tempting to just use a newline (equivalent to a semicolon). The programmer must remember to type "&&" after each command, or use `set -e` at the start of the RUN command, or use `SHELL ["/bin/sh", "-e", "-c"]` at the top of the Dockerfile. Sigh...

    > Are the line breaks semantic, or is it all a multiline string?

    The line breaks are preserved ("what you see is what you get").

    > Is EOF a special end-of-file token

    You can choose which token to use (EOF is a common convention, but any token can be used). The text right after the "<<" indicates which token you've chosen, and the heredoc is terminated by the first line that contains just that token.

    This allows you to easily create a heredoc containing other heredocs. Can you think of any other quoting syntax that allows that? (Lisp's quote form comes to mind.)

    > Where is it documented?

    The introduction blog post has already been linked. The reference documentation (https://github.com/moby/buildkit/blob/master/frontend/docker...) mentions but doesn't have a formal specification (unfortunately this is a wider problem for Dockerfiles, see https://supercontainers.github.io/containers-wg/ideas/docker... instead it links to the sh syntax (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...), on which the Dockerfile heredoc syntax is based.

    (Good luck looking up this syntax if you don't know what it's called. But that's the same for most punctuation-based syntax.)

    16 projects | news.ycombinator.com | 26 Jan 2023
    Unfortunately this syntax is not generally supported yet - it's only supported with the buildkit backend and only landed in the 1.3 "labs" release. It was moved to stable in early 2022 (see https://github.com/moby/buildkit/issues/2574), so that seems to be better, but I think may still require a syntax directive to enable.

    Many other dockerfile build tools still don't support it, e.g. buildah (see https://github.com/containers/buildah/issues/3474)

    Useful now if you have control over the environment your images are being built in, but I'm excited to the future where it's commonplace!

What are some alternatives?

When comparing jib and buildkit you can also consider the following projects:

buildah - A tool that facilitates building OCI images.

kaniko - Build Container Images In Kubernetes

jkube - Build and Deploy java applications on Kubernetes

Bazel - a fast, scalable, multi-language and extensible build system

buildx - Docker CLI plugin for extended build capabilities with BuildKit

podman - Podman: A tool for managing OCI containers and pods.

docker-maven-plugin - INACTIVE: A maven plugin for Docker

nerdctl - contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...

shadow - Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.

distroless - ๐Ÿฅ‘ Language focused docker images, minus the operating system.

amazon-ecr-login - Logs into Amazon ECR with the local Docker client.