-
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
Jib should maintain hard-links and symlinks #2275
Comments
Great savings in the time to produce the image as well, give far less material is transferred. |
The relevant starting point is |
It is trivial to add support for symlinks to Just use the standard Java There's a little bit more to it if the source filesystem isn't UNIX or if the target of the link is not a relative path. Still, it would be nice if ordinary symlinks with relative targets "just worked" and it's a pretty trivial change here to make that happen. One might argue if the path is absolute then presumably it's already intended for the container so nothing special has to be done with it. There is one major catch though: the current behavior is to follow symlinks, so changing will break any builds that rely on the follow behavior. |
@dfelliott Thanks for the idea. However, this FR is not currently prioritized. |
We gave some thought on this in the past, and we think we want a new dedicated configuration and API in jib-core. Note this idea has been around for some time (#1576) actually. |
The hardlinking supported by the Spotify docker-client can result in large image-size savings for situations using lots of hard-links (jvanzyl/dockerfile-maven#2). Jib should track hard-links. Jib should also preserve symlinks (perhaps only if they reference within the layer?).
The text was updated successfully, but these errors were encountered: