-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate what to do for jib:dockerBuild
and jib:buildTar
for multi-platform image building
#2743
Comments
this looks closely related to issue #2751 |
Thanks for the info in #2751. That's great! Just for more clarification: These two are related, but also largely orthogonal. This issue is about what how to push multi-arch images to a local Docker daemon or create a tar in which format. It's only relevant with the #2751 is only about how to better record all the information about the built images in multi-arch image building. (Currently, Jib is recording only the information about the manifest list push result). #2751 is independent of which target storage to use (whether a remote registry, local Docker daemon, or tar on a filesystem). |
I've just come across this issue. We're looking to add arm64 images to our builds, but doing so breaks local development processes that use jib:dockerBuild. From our perspective we'd like this to continue working, and since docker doesn't support storing multiple architectures for an image (from what I can see), and images in the local docker instance are almost always there to be run, it would make sense for jib:dockerBuild to pick the native platform of the docker instance. This should probably be accompanied by a warning saying it's only building for a single platform. At least this way, dockerBuild is still somewhat useful, unlike at the moment where adding platforms renders it useless. |
That's a good idea. For now, please use the workaround of having two profiles, e.g., a default |
|
Thanks for the clarification and link @SgtSilvio |
This might be a better solution for some than requiring defining a command line property (which I always forget 😏). jib {
to {
image = "..."
auth {...}
}
from {
image = "openjdk:17-jdk"
}
}
gradle.taskGraph.addTaskExecutionGraphListener {
if (!it.hasTask(":jibDockerBuild")) {
logger.info("JIB: Enabling Multi-Platform Images")
jib.from.platforms {
platform {
os = "linux"
architecture = "arm64"
}
platform {
os = "linux"
architecture = "amd64"
}
}
}
} The only sticking point is that the param to |
This issue is closed but I think it's not resolved (just ran into the issue/error that multi-platform is not supported). I think that @elFarto suggestion:
seems very reasonable. |
@ddixit14 this issue is still not fixed.... I get |
I don't think this issue should have been closed. As noted above, the problem still persists. It does have a workaround however, so in the meantime please use different maven profiles as recommended |
jib-maven-plugin:3.4.3, jib-gradle-plugin:3.4.3 and jib-core:0.27.1 have been released with a fix for this! When building to the local docker daemon, Jib now selects the image with os and architecture matching the local docker environment. |
The Docker daemon probably won't accept a manifest list (or may require a different archive format).
The text was updated successfully, but these errors were encountered: