-
Notifications
You must be signed in to change notification settings - Fork 489
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
buildx bake file doesn't support new ulimit directives #2241
Comments
This is not yet supported, we need to think of proper way to implement this with bake, see #790 (comment). It might also make more sense to have this attr in the dockerfile. |
Oh actually this error comes from compose file validation in bake, that should be solved with #2205 but still |
Thank you for fast response. I don't think ulimit belongs to Dockerfile. I see it as an environment specific directive which is more suitable for compose or hcl file instead, to have it propertly working with Compose Profiles, etc. You can check docker/compose#11167 for initial reasoning for ulimit support in compose file. For now I'm using YAML file with |
Opened #2242 if you want to try it:
|
LOL, saw this ticket, and thought it was not yet supported by Buildkit, so went looking at my epic (moby/moby#40379), but found that this was implemented at some point for BuildKit
Also on the fence if this would make sense in the Dockerfile itself 🤔 I guess the "upside" would be to allow defining that a specific stage requires specific limits, but OTOH that would imply that the Dockerfile would assume it could escalate / gain additional resources (likely not something desirable), besides likely not possible if it tries to gain higher limits than available? (although in that case, if could potentially give a more specific error that the Dockerfile requires certain limits) |
Hi, I can confirm that setting One caveat though! It looks like nor passing EDIT: by "no longer works for me on 25.0" I have meant that I cannot verify if it works or not, because my use case specifically requires |
Interesting, can you try with a container builder?
|
I tried on Docker 25 with a simple Dockerfile and seems to work for me: FROM busybox
RUN ulimit -n
|
OK, I've bean able to verify this on 25.0 too. It works 👍 I've set Given that ulimit parameter is now capped by default it looses some usage point (at least for our use case where we specifically want to cap it). I think at least ulimit parameter documentation needs to be updated everywhere as now it silently allows very large values, but they do not work:
|
It isn't capped by Docker anymore, just inherits the default from the system which will typically be
Looks like that shouldn't silently happen anymore and you'd get a failure. Had a quick glance over the docs but doesn't appear to mention any caveats / advice to raise the hard limit beyond the system-wide default. Out of curiosity, what were you building that needed more than 524288 file descriptors? Or was the issue with the soft limit being 1024? (some software that requires a higher limit doesn't request it internally even though it should, so you need to raise it manually if 1024 is not enough for a process) |
It's probably a matter of what system default was there before Docker changes. At least for me, on RedHat Enterprise Linux, root user had
I'm building some ancient database (SQL Anywhere from year 1999) Docker image. I'm not sure how their built their install and other cli utilities, but I found that they enumerate all possible file descriptors in the system every time I execute these utilities in a Dockerfile. On my environment that's Anyway, as you can see from my previous comment, if one needs to actually increase |
Description
Not sure if this is a bug, or just feature oversight.
compose-spec/compose-spec#433 implemented support for ulimit directives in Docker Compose file specification, however if I try to use new directives in BuildX Bake file it produces an error.
The text was updated successfully, but these errors were encountered: